mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
peer closes during partial buffered just hang up
https://github.com/warmcat/libwebsockets/issues/573
This commit is contained in:
parent
81c221ed35
commit
8860eddeb2
1 changed files with 11 additions and 0 deletions
|
@ -1268,6 +1268,17 @@ spill:
|
|||
/* if he sends us 2 CLOSE, kill him */
|
||||
return -1;
|
||||
|
||||
if (lws_partial_buffered(wsi)) {
|
||||
/*
|
||||
* if we're in the middle of something,
|
||||
* we can't do a normal close response and
|
||||
* have to just close our end.
|
||||
*/
|
||||
wsi->socket_is_permanently_unusable = 1;
|
||||
lwsl_parser("Closing on peer close due to Pending tx\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (user_callback_handle_rxflow(
|
||||
wsi->protocol->callback, wsi,
|
||||
LWS_CALLBACK_WS_PEER_INITIATED_CLOSE,
|
||||
|
|
Loading…
Add table
Reference in a new issue