mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
close if we tried to close politely just close next time
Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
parent
50097dd078
commit
22524a65a2
1 changed files with 4 additions and 0 deletions
|
@ -200,6 +200,10 @@ libwebsocket_close_and_free_session(struct libwebsocket_context *context,
|
|||
if (old_state == WSI_STATE_DEAD_SOCKET)
|
||||
return;
|
||||
|
||||
/* we tried the polite way... */
|
||||
if (old_state == WSI_STATE_AWAITING_CLOSE_ACK)
|
||||
goto just_kill_connection;
|
||||
|
||||
wsi->u.ws.close_reason = reason;
|
||||
|
||||
if (wsi->mode == LWS_CONNMODE_HTTP_SERVING && wsi->u.http.fd) {
|
||||
|
|
Loading…
Add table
Reference in a new issue