mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-30 00:00:16 +01:00
wsimux: immortal: only process immortality once per stream
We can call mark immortal multiple times for a child stream, make sure it is only processed (and increments the nwsi refcount) the once.
This commit is contained in:
parent
a335958923
commit
87dd9283e1
1 changed files with 5 additions and 1 deletions
|
@ -1305,10 +1305,14 @@ lws_mux_mark_immortal(struct lws *wsi)
|
||||||
&& !wsi->client_mux_substream
|
&& !wsi->client_mux_substream
|
||||||
#endif
|
#endif
|
||||||
) {
|
) {
|
||||||
lwsl_wsi_err(wsi, "not h2 substream");
|
lwsl_wsi_err(wsi, "not mux substream");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (wsi->mux_stream_immortal)
|
||||||
|
/* only need to handle it once per child wsi */
|
||||||
|
return;
|
||||||
|
|
||||||
nwsi = lws_get_network_wsi(wsi);
|
nwsi = lws_get_network_wsi(wsi);
|
||||||
if (!nwsi)
|
if (!nwsi)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue