Fixed mux closed
This commit is contained in:
BIN
extras/doc/ESP8266 - AT Instruction Set v2.1.0.pdf
Normal file
BIN
extras/doc/ESP8266 - AT Instruction Set v2.1.0.pdf
Normal file
Binary file not shown.
Binary file not shown.
@@ -481,9 +481,9 @@ public:
|
|||||||
}
|
}
|
||||||
data = "";
|
data = "";
|
||||||
} else if (data.endsWith(GF("CLOSED"))) {
|
} else if (data.endsWith(GF("CLOSED"))) {
|
||||||
int nl = data.lastIndexOf(GSM_NL, data.length()-8);
|
int muxStart = max(0,data.lastIndexOf(GSM_NL, data.length()-8));
|
||||||
int coma = data.indexOf(',', nl+2);
|
int coma = data.indexOf(',', muxStart);
|
||||||
int mux = data.substring(nl+2, coma).toInt();
|
int mux = data.substring(muxStart, coma).toInt();
|
||||||
if (mux >= 0 && mux < TINY_GSM_MUX_COUNT && sockets[mux]) {
|
if (mux >= 0 && mux < TINY_GSM_MUX_COUNT && sockets[mux]) {
|
||||||
sockets[mux]->sock_connected = false;
|
sockets[mux]->sock_connected = false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user