diff --git a/lib/core/context.c b/lib/core/context.c index 2cdf4c788..162a1bce3 100644 --- a/lib/core/context.c +++ b/lib/core/context.c @@ -1724,10 +1724,6 @@ lws_context_destroy(struct lws_context *context) #if defined(LWS_WITH_NETWORK) -#if defined(LWS_WITH_SYS_METRICS) - lws_metrics_dump(context); -#endif - /* * Close any vhost listen wsi * @@ -2020,6 +2016,10 @@ next: case LWSCD_FINALIZATION: +#if defined(LWS_WITH_SYS_METRICS) + lws_metrics_dump(context); +#endif + context->evlib_finalize_destroy_after_int_loops_stop = 1; #if defined(LWS_WITH_NETWORK) diff --git a/lib/secure-streams/protocols/ss-h1.c b/lib/secure-streams/protocols/ss-h1.c index 4b96e678b..da982c7ad 100644 --- a/lib/secure-streams/protocols/ss-h1.c +++ b/lib/secure-streams/protocols/ss-h1.c @@ -571,7 +571,6 @@ secstream_h1(struct lws *wsi, enum lws_callback_reasons reason, void *user, lws_sul_cancel(&h->sul); if (h->prev_ss_state != LWSSSCS_CONNECTED) { - lws_metrics_caliper_report_hist(h->cal_txn, wsi); r = lws_ss_event_helper(h, LWSSSCS_CONNECTED); if (r != LWSSSSRET_OK) return _lws_ss_handle_state_ret_CAN_DESTROY_HANDLE(r, wsi, &h); @@ -742,12 +741,7 @@ malformed: h->being_serialized && ( !strcmp(h->policy->u.http.method, "PUT") || !strcmp(h->policy->u.http.method, "POST"))) { -#if defined(LWS_WITH_SYS_METRICS) - /* - * If any hanging caliper measurement, dump it, and free any tags - */ - lws_metrics_caliper_report_hist(h->cal_txn, (struct lws *)NULL); -#endif + r = lws_ss_event_helper(h, LWSSSCS_CONNECTED); if (r) return _lws_ss_handle_state_ret_CAN_DESTROY_HANDLE(r, wsi, &h); diff --git a/lib/system/metrics/metrics.c b/lib/system/metrics/metrics.c index 2321cca9c..f906bcd40 100644 --- a/lib/system/metrics/metrics.c +++ b/lib/system/metrics/metrics.c @@ -885,7 +885,5 @@ lws_metrics_hist_bump_priv_tagged(lws_metric_pub_t *mt, lws_dll2_owner_t *tow, lws_metrics_tags_serialize(tow2, qual + p, sizeof(qual) - p); - lwsl_warn("%s: '%s'\n", __func__, qual); - lws_metrics_hist_bump(mt, qual); }