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

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

This commit is contained in:
Andrew Canaday 2015-12-02 15:13:56 -05:00 committed by Andy Green
parent ad2248a207
commit 622d9f2ff3

View file

@ -497,6 +497,9 @@ libwebsocket_service_fd(struct libwebsocket_context *context,
n = lws_server_socket_service(context, wsi, pollfd);
if (n < 0)
goto close_and_handled;
pending = lws_ssl_pending(wsi);
if (pending)
goto handle_pending;
goto handled;
case LWS_CONNMODE_WS_SERVING:
@ -596,6 +599,7 @@ drain:
pending = lws_ssl_pending(wsi);
if (pending) {
handle_pending:
pending = pending > sizeof(context->service_buffer)?
sizeof(context->service_buffer):pending;
goto read;