From 7c507e4700fc5e11f9576081ad3153b916efa4d6 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Thu, 14 Jan 2016 15:17:28 +0800 Subject: [PATCH] fix client getting hung up on at negotiation Signed-off-by: Andy Green --- lib/client.c | 1 + lib/service.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/lib/client.c b/lib/client.c index bd84015c..7dcd1753 100644 --- a/lib/client.c +++ b/lib/client.c @@ -442,6 +442,7 @@ some_wait: lws_latency(context, wsi, "send lws_issue_raw", n, n == 1); switch (n) { + case 0: case LWS_SSL_CAPABLE_ERROR: goto bail3; case LWS_SSL_CAPABLE_MORE_SERVICE: diff --git a/lib/service.c b/lib/service.c index 136da2d2..4544b501 100644 --- a/lib/service.c +++ b/lib/service.c @@ -701,6 +701,8 @@ handle_pending: break; #else n = lws_client_socket_service(context, wsi, pollfd); + if (n) + return 1; goto handled; #endif }