Fix failure to outbound-connect introduced by previous commit

Commit a5ae72c0f6 forgot to include
sockets with in-progress connections as writable, which broke all
outgoing connections. Fixed.
This commit is contained in:
Alex Villacís Lasso
2021-09-06 18:02:25 -05:00
parent a5ae72c0f6
commit 6f8bcef490

View File

@@ -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;
}