We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4785240 + 796b4c7 commit bc8c95fCopy full SHA for bc8c95f
src/helpers/esp32/SerialWifiInterface.cpp
@@ -44,7 +44,18 @@ bool SerialWifiInterface::isWriteBusy() const {
44
}
45
46
size_t SerialWifiInterface::checkRecvFrame(uint8_t dest[]) {
47
- if (!client) client = server.available();
+ // check if new client connected
48
+ auto newClient = server.available();
49
+ if (newClient) {
50
+
51
+ // disconnect existing client
52
+ deviceConnected = false;
53
+ client.stop();
54
55
+ // switch active connection to new client
56
+ client = newClient;
57
58
+ }
59
60
if (client.connected()) {
61
if (!deviceConnected) {
0 commit comments