static void lws_libuv_closewsi(uv_handle_t* handle) { struct lws *n = NULL, *wsi = (struct lws *)(((char *)handle) - (char *)(&n->w_read.uv_watcher)); struct lws_context *context = lws_get_context(wsi); int lspd = 0; if (wsi->mode == LWSCM_SERVER_LISTENER && wsi->context->deprecated) { lspd = 1; context->deprecation_pending_listen_close_count--; if (!context->deprecation_pending_listen_close_count) lspd = 2; } lws_close_free_wsi_final(wsi); if (lspd == 2 && context->deprecation_cb) { lwsl_notice("calling deprecation callback\n"); context->deprecation_cb(); } if (context->requested_kill && context->count_wsi_allocated == 0) lws_libuv_kill(context); }
static void lws_libuv_closewsi(uv_handle_t* handle) { struct lws *n = NULL, *wsi = (struct lws *)(((char *)handle) - (char *)(&n->w_read.uv_watcher)); struct lws_context *context = lws_get_context(wsi); lws_close_free_wsi_final(wsi); if (context->requested_kill && context->count_wsi_allocated == 0) lws_libuv_kill(context); }