From 044ab269511b6ec8d6bd100ccd45e245b8d93647 Mon Sep 17 00:00:00 2001 From: Sara Damiano Date: Mon, 20 Jan 2020 13:25:16 -0500 Subject: [PATCH] missed return Signed-off-by: Sara Damiano --- src/TinyGsmClientSaraR4.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/TinyGsmClientSaraR4.h b/src/TinyGsmClientSaraR4.h index fb19e05..897e1c2 100644 --- a/src/TinyGsmClientSaraR4.h +++ b/src/TinyGsmClientSaraR4.h @@ -111,7 +111,7 @@ public: TINY_GSM_CLIENT_DUMP_MODEM_BUFFER() if (at->supportsAsyncSockets) { - DBG("### Closing socket asynchronously! Socket might remain open until arrival of +UUSOCL: ", mux); + DBG("### Closing socket asynchronously! Socket might remain open until arrival of +UUSOCL:", mux); // faster asynchronous close // NOT supported on SARA-R404M / SARA-R410M-01B at->sendAT(GF("+USOCL="), mux, GF(",1")); @@ -643,14 +643,14 @@ protected: "the URC '+UUSOCO' appears."); sendAT(GF("+USOCO="), *mux, ",\"", host, "\",", port, ",1"); while (millis() - startMillis < timeout_ms && - sockets[*mux]->sock_connected == false) {} - } - else { - // use synchronous open - sendAT(GF("+USOCO="), *mux, ",\"", host, "\",", port); - int rsp = waitResponse(timeout_ms); - return (1 == rsp); - } + sockets[*mux]->sock_connected == false) {} + return sockets[*mux]->sock_connected == true; + } else { + // use synchronous open + sendAT(GF("+USOCO="), *mux, ",\"", host, "\",", port); + int rsp = waitResponse(timeout_ms); + return (1 == rsp); + } } int16_t modemSend(const void* buff, size_t len, uint8_t mux) {