From 832f30a45403fac23aba5f20ae0dfa50bb51cf53 Mon Sep 17 00:00:00 2001 From: pennam Date: Mon, 26 Sep 2022 14:16:30 +0200 Subject: [PATCH] clientRead: keep reading if client not connected but data is available --- src/BearSSLClient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BearSSLClient.cpp b/src/BearSSLClient.cpp index f1df47c..e377da9 100644 --- a/src/BearSSLClient.cpp +++ b/src/BearSSLClient.cpp @@ -509,7 +509,7 @@ int BearSSLClient::clientRead(void *ctx, unsigned char *buf, size_t len) { Client* c = (Client*)ctx; - if (!c->connected()) { + if (!c->connected() && !c->available()) { return -1; }