From 9a6d16d88c8a263a0e88eb90177ae8bc9bc370d8 Mon Sep 17 00:00:00 2001 From: Andrew Canaday Date: Wed, 2 Dec 2015 15:26:10 -0500 Subject: [PATCH] Fixed formatting and corrected pending double-check. --- lib/service.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/service.c b/lib/service.c index fb6ebb725..fde3ccd77 100644 --- a/lib/service.c +++ b/lib/service.c @@ -490,11 +490,12 @@ libwebsocket_service_fd(struct libwebsocket_context *context, n = lws_server_socket_service(context, wsi, pollfd); if (n < 0) goto close_and_handled; - if( lws_ssl_pending(wsi) ) { + pending = lws_ssl_pending(wsi); + if( pending ) { goto handle_pending; } else { - goto handled; + goto handled; }; case LWS_CONNMODE_WS_SERVING: @@ -590,8 +591,8 @@ drain: eff_buf.token_len = 0; } while (more); -handle_pending: pending = lws_ssl_pending(wsi); +handle_pending: if (pending) { pending = pending > sizeof(context->service_buffer)? sizeof(context->service_buffer):pending;