1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

client: clean up pwsi if late failure

This commit is contained in:
Andy Green 2020-12-20 08:31:14 +00:00
parent eb5f437578
commit 1f477e4915

View file

@ -453,8 +453,12 @@ lws_client_connect_via_info(const struct lws_client_connect_info *i)
#if defined(LWS_WITH_TLS)
bail3:
lwsl_info("%s: tls start fail\n", __func__);
lws_close_free_wsi(wsi, LWS_CLOSE_STATUS_NOSTATUS, "tls start fail");
if (i->pwsi)
*i->pwsi = NULL;
return NULL;
#endif