mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
sspc: allocate dsh once per stream
This commit is contained in:
parent
44ad73e07c
commit
19e7bc106e
1 changed files with 5 additions and 3 deletions
|
@ -140,9 +140,11 @@ callback_sspc_client(struct lws *wsi, enum lws_callback_reasons reason,
|
|||
lwsl_info("%s: CONNECTED (%s)\n", __func__, h->ssi.streamtype);
|
||||
|
||||
h->state = LPCSCLI_SENDING_INITIAL_TX;
|
||||
h->dsh = lws_dsh_create(NULL, (LWS_PRE + LWS_SS_MTU) * 160, 1);
|
||||
if (!h->dsh)
|
||||
return -1;
|
||||
if (!h->dsh) {
|
||||
h->dsh = lws_dsh_create(NULL, (LWS_PRE + LWS_SS_MTU) * 160, 1);
|
||||
if (!h->dsh)
|
||||
return -1;
|
||||
}
|
||||
|
||||
lws_set_timeout(wsi, PENDING_TIMEOUT_AWAITING_CLIENT_HS_SEND, 3);
|
||||
lws_callback_on_writable(wsi);
|
||||
|
|
Loading…
Add table
Reference in a new issue