mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
non ssl on ssl port fixes
As found by 'github user 7' https://github.com/warmcat/libwebsockets/issues/338 Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
parent
a42ac7b1fb
commit
cc64fb535b
1 changed files with 4 additions and 2 deletions
|
@ -633,8 +633,10 @@ lws_server_socket_service_ssl(struct libwebsocket_context *context,
|
|||
wsi->ssl = NULL;
|
||||
goto accepted;
|
||||
}
|
||||
if (n == 0 || LWS_ERRNO == LWS_EAGAIN ||
|
||||
LWS_ERRNO == LWS_EWOULDBLOCK) {
|
||||
if (!n) /* connection is gone */
|
||||
goto fail;
|
||||
if (n < 0 && (LWS_ERRNO == LWS_EAGAIN ||
|
||||
LWS_ERRNO == LWS_EWOULDBLOCK)) {
|
||||
/*
|
||||
* well, we get no way to know ssl or not
|
||||
* so go around again waiting for something
|
||||
|
|
Loading…
Add table
Reference in a new issue