diff --git a/lib/service.c b/lib/service.c index fde3ccd77..9ac9381dc 100644 --- a/lib/service.c +++ b/lib/service.c @@ -592,8 +592,8 @@ drain: } while (more); pending = lws_ssl_pending(wsi); -handle_pending: if (pending) { +handle_pending: pending = pending > sizeof(context->service_buffer)? sizeof(context->service_buffer):pending; goto read;