PIEthernet reconnect

This commit is contained in:
2020-08-26 18:01:17 +03:00
parent cfebf8cf23
commit 7f2c82dc69
2 changed files with 16 additions and 7 deletions

View File

@@ -33,10 +33,10 @@ bool PICloudServer::openDevice() {
piCout << "PICloudServer open device" << path();
bool op = eth.connect(path(), false);
if (op) {
// CONNECTL(&eth, disconnected, [this](bool){opened_ = false;});
return true;
} else {
eth.close();
}
eth.close();
return false;
}