From e4371e728b6482438ceeab0c2034d8dde40dc73d Mon Sep 17 00:00:00 2001 From: Andy Green <andy@warmcat.com> Date: Thu, 16 Nov 2017 09:55:54 +0800 Subject: [PATCH] client: handle bio_create failing --- lib/client.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/client.c b/lib/client.c index 3c8986cd..bf7ce553 100755 --- a/lib/client.c +++ b/lib/client.c @@ -355,9 +355,10 @@ start_ws_hanshake: #ifdef LWS_OPENSSL_SUPPORT /* we can retry this... just cook the SSL BIO the first time */ - if (wsi->use_ssl && !wsi->ssl) { - if (lws_ssl_client_bio_create(wsi)) - return -1; + if (wsi->use_ssl && !wsi->ssl && + lws_ssl_client_bio_create(wsi) < 0) { + cce = "bio_create failed"; + goto bail3; } if (wsi->use_ssl) { -- GitLab