From ed3172b154053a54c5faf6a838340092e4b3acf2 Mon Sep 17 00:00:00 2001 From: pennam Date: Wed, 22 Nov 2023 08:41:46 +0100 Subject: [PATCH] SocketWrapper: make connected() method return true if there is data available to read --- libraries/SocketWrapper/src/MbedClient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/SocketWrapper/src/MbedClient.cpp b/libraries/SocketWrapper/src/MbedClient.cpp index 49265c002..c8686c595 100644 --- a/libraries/SocketWrapper/src/MbedClient.cpp +++ b/libraries/SocketWrapper/src/MbedClient.cpp @@ -299,7 +299,7 @@ void arduino::MbedClient::stop() { } uint8_t arduino::MbedClient::connected() { - return _status; + return ((_status) || (available() > 0)); } IPAddress arduino::MbedClient::remoteIP() {