client connect: oom4 clean up timeout list
https://github.com/warmcat/libwebsockets/issues/810
This commit is contained in:
parent
0db9b9f346
commit
3d6a1e11c2
3 changed files with 5 additions and 1 deletions
|
@ -346,6 +346,7 @@ oom4:
|
|||
/* take care that we might be inserted in fds already */
|
||||
if (wsi->position_in_fds_table != -1)
|
||||
goto failed1;
|
||||
lws_remove_from_timeout_list(wsi);
|
||||
lws_header_table_detach(wsi, 0);
|
||||
lws_free(wsi);
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ lws_free_wsi(struct lws *wsi)
|
|||
lws_free(wsi);
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
lws_remove_from_timeout_list(struct lws *wsi)
|
||||
{
|
||||
struct lws_context_per_thread *pt = &wsi->context->pt[(int)wsi->tsi];
|
||||
|
|
|
@ -1612,6 +1612,9 @@ lws_issue_raw(struct lws *wsi, unsigned char *buf, size_t len);
|
|||
LWS_EXTERN int LWS_WARN_UNUSED_RESULT
|
||||
lws_service_timeout_check(struct lws *wsi, unsigned int sec);
|
||||
|
||||
LWS_EXTERN void
|
||||
lws_remove_from_timeout_list(struct lws *wsi);
|
||||
|
||||
LWS_EXTERN struct lws * LWS_WARN_UNUSED_RESULT
|
||||
lws_client_connect_2(struct lws *wsi);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue