1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

mqtt: fix issue about mux_substream of child wsi

This commit is contained in:
Lucas 2024-11-24 13:02:49 +00:00
parent 15dec8ef90
commit 28f09fe4fb

View file

@ -440,11 +440,6 @@ rops_issue_keepalive_mqtt(struct lws *wsi, int isvalid)
}
nwsi->mqtt->send_pingreq = 1;
if (lws_check_opt(wsi->a.context->options, LWS_SERVER_OPTION_LIBUV)) {
nwsi->mux_substream = 0;
}
lws_callback_on_writable(nwsi);
return 0;
@ -557,6 +552,16 @@ rops_callback_on_writable_mqtt(struct lws *wsi)
)
return 1;
if (lws_check_opt(wsi->a.context->options, LWS_SERVER_OPTION_LIBUV)) {
if (network_wsi->mux_substream != 0)
network_wsi->mux_substream = 0;
lws_start_foreach_ll(struct lws *, w, network_wsi->mux.child_list) {
if (w->mux.requested_POLLOUT == 0)
w->mux.requested_POLLOUT = 1;
} lws_end_foreach_ll(w, mux.sibling_list);
}
return 0;
}