mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
sspc: ss timeout check is onward still alive before setting
This commit is contained in:
parent
ee404d7449
commit
d51e44388c
1 changed files with 18 additions and 8 deletions
|
@ -721,18 +721,28 @@ payload_ff:
|
|||
if (--par->rem)
|
||||
goto hangup;
|
||||
|
||||
if ((unsigned int)par->temp32 == 0xffffffff) {
|
||||
lwsl_notice("%s: cancel ss timeout\n", __func__);
|
||||
lws_ss_cancel_timeout(*pss);
|
||||
} else {
|
||||
/*
|
||||
* *pss may have gone away asynchronously inbetweentimes
|
||||
*/
|
||||
|
||||
if (!par->temp32)
|
||||
par->temp32 = (*pss)->policy->timeout_ms;
|
||||
if (*pss) {
|
||||
|
||||
lwsl_notice("%s: set ss timeout for +%ums\n",
|
||||
if ((unsigned int)par->temp32 == 0xffffffff) {
|
||||
lwsl_notice("%s: cancel ss timeout\n",
|
||||
__func__);
|
||||
lws_ss_cancel_timeout(*pss);
|
||||
} else {
|
||||
|
||||
if (!par->temp32)
|
||||
par->temp32 =
|
||||
(*pss)->policy->timeout_ms;
|
||||
|
||||
lwsl_notice("%s: set ss timeout for +%ums\n",
|
||||
__func__, par->temp32);
|
||||
|
||||
lws_ss_start_timeout((*pss), par->temp32);
|
||||
lws_ss_start_timeout((*pss),
|
||||
par->temp32);
|
||||
}
|
||||
}
|
||||
|
||||
par->ps = RPAR_TYPE;
|
||||
|
|
Loading…
Add table
Reference in a new issue