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() {