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

hs: close immediately if negotation failed

This commit is contained in:
Andy Green 2018-01-03 09:11:27 +08:00
parent 15820da8ba
commit cfb076c8a0

View file

@ -1797,6 +1797,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;