Merge pull request #685 from liamcottle/fix/wifi-companion-clients
WiFi Companion: always accept new connections
This commit is contained in:
@@ -44,7 +44,18 @@ bool SerialWifiInterface::isWriteBusy() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
size_t SerialWifiInterface::checkRecvFrame(uint8_t dest[]) {
|
size_t SerialWifiInterface::checkRecvFrame(uint8_t dest[]) {
|
||||||
if (!client) client = server.available();
|
// check if new client connected
|
||||||
|
auto newClient = server.available();
|
||||||
|
if (newClient) {
|
||||||
|
|
||||||
|
// disconnect existing client
|
||||||
|
deviceConnected = false;
|
||||||
|
client.stop();
|
||||||
|
|
||||||
|
// switch active connection to new client
|
||||||
|
client = newClient;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (client.connected()) {
|
if (client.connected()) {
|
||||||
if (!deviceConnected) {
|
if (!deviceConnected) {
|
||||||
|
|||||||
Reference in New Issue
Block a user