Try to reconnect with drone after disconnect
This used to work earlier, but got broken when the incompatibility check was added as we didn't want reconnect to be initiated if versions were incompatible. This fix will always try to reconnect, except for following cases - * Compatibility check is false * Bad data received from drone * User triggered disconnect Fixes #333
This commit is contained in:
parent
c2c52d1e6d
commit
a1705e7619
@ -206,6 +206,7 @@ void PortGroup::processVersionCompatibility(PbRpcController *controller)
|
||||
logError(id(), QString("checkVersion failed: %1")
|
||||
.arg(QString::fromStdString(verCompat->notes())));
|
||||
compat = kIncompatible;
|
||||
reconnect = false;
|
||||
emit portGroupDataChanged(mPortGroupId);
|
||||
|
||||
QMessageBox msgBox;
|
||||
@ -289,8 +290,6 @@ void PortGroup::on_rpcChannel_error(QAbstractSocket::SocketError socketError)
|
||||
" - is it drone or some other process?")
|
||||
.arg(rpcChannel->serverName())
|
||||
.arg(rpcChannel->serverPort()));
|
||||
// fall-through
|
||||
case QAbstractSocket::RemoteHostClosedError:
|
||||
reconnect = false;
|
||||
break;
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user