fix client getting hung up on at negotiation
authorAndy Green <andy.green@linaro.org>
Thu, 14 Jan 2016 07:17:28 +0000 (15:17 +0800)
committerAndy Green <andy.green@linaro.org>
Fri, 15 Jan 2016 11:34:33 +0000 (19:34 +0800)
Signed-off-by: Andy Green <andy.green@linaro.org>
lib/client.c
lib/service.c

index bd84015..7dcd175 100644 (file)
@@ -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:
index 136da2d..4544b50 100644 (file)
@@ -701,6 +701,8 @@ handle_pending:
                break;
 #else
                n = lws_client_socket_service(context, wsi, pollfd);
+               if (n)
+                       return 1;
                goto handled;
 #endif
        }