Checking if socket is connected before closing

This commit is contained in:
Sara Damiano
2018-11-07 18:03:35 -05:00
parent 3b405775a8
commit 3b971ba759

View File

@@ -65,7 +65,7 @@ public:
public:
virtual int connect(const char *host, uint16_t port) {
stop();
if (sock_connected) stop();
TINY_GSM_YIELD();
rx.clear();
sock_connected = at->modemConnect(host, port, &mux);