From 6f8bcef490cc0647a2d3277cc63b2cf26e03e1a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Villac=C3=ADs=20Lasso?= Date: Mon, 6 Sep 2021 18:02:25 -0500 Subject: [PATCH] Fix failure to outbound-connect introduced by previous commit Commit a5ae72c0f6069b67f9eb0e5ed22282c6bbba2474 forgot to include sockets with in-progress connections as writable, which broke all outgoing connections. Fixed. --- src/AsyncTCP.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AsyncTCP.cpp b/src/AsyncTCP.cpp index 4146c6c..61bd4b5 100644 --- a/src/AsyncTCP.cpp +++ b/src/AsyncTCP.cpp @@ -866,7 +866,7 @@ bool AsyncClient::send() bool AsyncClient::_pendingWrite(void) { xSemaphoreTake(_write_mutex, (TickType_t)portMAX_DELAY); - bool pending = (_writeQueue.size() > 0); + bool pending = ((_conn_state > 0 && _conn_state < 4) || _writeQueue.size() > 0); xSemaphoreGive(_write_mutex); return pending; }