mirror of
https://github.com/KevinMidboe/TinyGSM.git
synced 2025-10-29 18:00:18 +00:00
Checking if socket is connected before closing
This commit is contained in:
@@ -65,7 +65,7 @@ public:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
virtual int connect(const char *host, uint16_t port) {
|
virtual int connect(const char *host, uint16_t port) {
|
||||||
stop();
|
if (sock_connected) stop();
|
||||||
TINY_GSM_YIELD();
|
TINY_GSM_YIELD();
|
||||||
rx.clear();
|
rx.clear();
|
||||||
sock_connected = at->modemConnect(host, port, &mux);
|
sock_connected = at->modemConnect(host, port, &mux);
|
||||||
|
|||||||
Reference in New Issue
Block a user