mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
Update client-http.c
This bug was triggered for example when the connection closes (e.g. timeout) just as we attempt a new reuse of the connection. Returning 0, means the callers will make use of a now invalid WSI. This often results in a double free of the wsi memory. Need to return -1
This commit is contained in:
parent
e8eb7d6bd6
commit
010502731c
1 changed files with 1 additions and 1 deletions
|
@ -286,7 +286,7 @@ hs2:
|
|||
lwsl_debug("ERROR writing to client socket\n");
|
||||
lws_close_free_wsi(wsi, LWS_CLOSE_STATUS_NOSTATUS,
|
||||
"cws");
|
||||
return 0;
|
||||
return -1; // closed wsi so let callers know
|
||||
case LWS_SSL_CAPABLE_MORE_SERVICE:
|
||||
lws_callback_on_writable(wsi);
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue