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:
parent
15dec8ef90
commit
28f09fe4fb
1 changed files with 10 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue