mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +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
f8a21fec22
commit
cab34801ea
1 changed files with 5 additions and 1 deletions
|
@ -1305,10 +1305,14 @@ lws_mux_mark_immortal(struct lws *wsi)
|
|||
&& !wsi->client_mux_substream
|
||||
#endif
|
||||
) {
|
||||
lwsl_wsi_err(wsi, "not h2 substream");
|
||||
lwsl_wsi_err(wsi, "not mux substream");
|
||||
return;
|
||||
}
|
||||
|
||||
if (wsi->mux_stream_immortal)
|
||||
/* only need to handle it once per child wsi */
|
||||
return;
|
||||
|
||||
nwsi = lws_get_network_wsi(wsi);
|
||||
if (!nwsi)
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue