Skip to content
Snippets Groups Projects
Commit 622d9f2f authored by Andrew Canaday's avatar Andrew Canaday Committed by Andy Green
Browse files

Handle pending SSL reads which would otherwise not trigger a POLLIN.

parent ad2248a2
No related branches found
No related tags found
No related merge requests found
...@@ -497,6 +497,9 @@ libwebsocket_service_fd(struct libwebsocket_context *context, ...@@ -497,6 +497,9 @@ libwebsocket_service_fd(struct libwebsocket_context *context,
n = lws_server_socket_service(context, wsi, pollfd); n = lws_server_socket_service(context, wsi, pollfd);
if (n < 0) if (n < 0)
goto close_and_handled; goto close_and_handled;
pending = lws_ssl_pending(wsi);
if (pending)
goto handle_pending;
goto handled; goto handled;
case LWS_CONNMODE_WS_SERVING: case LWS_CONNMODE_WS_SERVING:
...@@ -596,6 +599,7 @@ drain: ...@@ -596,6 +599,7 @@ drain:
pending = lws_ssl_pending(wsi); pending = lws_ssl_pending(wsi);
if (pending) { if (pending) {
handle_pending:
pending = pending > sizeof(context->service_buffer)? pending = pending > sizeof(context->service_buffer)?
sizeof(context->service_buffer):pending; sizeof(context->service_buffer):pending;
goto read; goto read;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment