1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00

hs: close immediately if negotation failed

This commit is contained in:
Andy Green 2018-01-03 09:23:29 +08:00
parent 13a7a8d0a2
commit 2e14e15970

View file

@ -1644,6 +1644,14 @@ drain:
break;
}
#endif
/*
* something went wrong with parsing the handshake, and
* we ended up back in the event loop without completing it
*/
case LWSCM_PRE_WS_SERVING_ACCEPT:
wsi->socket_is_permanently_unusable = 1;
goto close_and_handled;
default:
#ifdef LWS_NO_CLIENT
break;