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