From 0a5526b9589548d9b0197fbac67d7a78a341448a Mon Sep 17 00:00:00 2001 From: qdztxc Date: Tue, 12 Jul 2022 09:47:00 +0100 Subject: [PATCH] ws: tell caller we closed wsi on handshake failure https://github.com/warmcat/libwebsockets/issues/2681 --- lib/roles/http/client/client-http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/roles/http/client/client-http.c b/lib/roles/http/client/client-http.c index 7dce85000..16fd8b245 100644 --- a/lib/roles/http/client/client-http.c +++ b/lib/roles/http/client/client-http.c @@ -270,7 +270,7 @@ hs2: lwsl_err("Failed to generate handshake for client\n"); lws_close_free_wsi(wsi, LWS_CLOSE_STATUS_NOSTATUS, "chs"); - return 0; + return -1; } /* send our request to the server */