From 38496b9184c90dff1480f7ea88043d60ecd8c76a Mon Sep 17 00:00:00 2001 From: Andy Green Date: Fri, 1 Jan 2021 14:55:13 +0000 Subject: [PATCH] smp: connect3: hold pt lock when removing failed connect attempt --- lib/core-net/client/connect3.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/core-net/client/connect3.c b/lib/core-net/client/connect3.c index 5de0419dd..029143a81 100644 --- a/lib/core-net/client/connect3.c +++ b/lib/core-net/client/connect3.c @@ -541,7 +541,9 @@ connect_to: lwsl_info("%s: abandoning connect due to timeout\n", __func__); try_next_dns_result_fds: + lws_pt_lock(pt, __func__); __remove_wsi_socket_from_fds(wsi); + lws_pt_unlock(pt); try_next_dns_result_closesock: /*