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

non ssl on ssl port zero recv ambiguous

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2015-11-06 08:23:05 +08:00
parent cc64fb535b
commit 79a3c5d425

View file

@ -633,8 +633,12 @@ lws_server_socket_service_ssl(struct libwebsocket_context *context,
wsi->ssl = NULL;
goto accepted;
}
if (!n) /* connection is gone */
goto fail;
if (!n) /*
* connection is gone, or nothing to read
* if it's gone, we will timeout on
* PENDING_TIMEOUT_SSL_ACCEPT
*/
break;
if (n < 0 && (LWS_ERRNO == LWS_EAGAIN ||
LWS_ERRNO == LWS_EWOULDBLOCK)) {
/*