Drone now disconnects only if version is incompatible or if any other RPC is received before versionCheck() - for all other errors/failures, drone does not disconnect the connection with client
This commit is contained in:
parent
9955d31b77
commit
57be4f3ada
@ -219,6 +219,7 @@ void RpcConnection::on_clientSock_dataAvail()
|
||||
::google::protobuf::Message *req, *resp;
|
||||
PbRpcController *controller;
|
||||
QString error;
|
||||
bool disconnect = false;
|
||||
|
||||
// Do we have enough bytes for a msg header?
|
||||
// If yes, peek into the header and get msg length
|
||||
@ -260,6 +261,7 @@ void RpcConnection::on_clientSock_dataAvail()
|
||||
qDebug("server(%s): version compatibility check pending",
|
||||
__FUNCTION__);
|
||||
error = "version compatibility check pending";
|
||||
disconnect = true;
|
||||
goto _error_exit;
|
||||
}
|
||||
|
||||
@ -347,6 +349,7 @@ _error_exit2:
|
||||
isPending = true;
|
||||
controller = new PbRpcController(NULL, NULL);
|
||||
controller->SetFailed(error);
|
||||
if (disconnect)
|
||||
controller->TriggerDisconnect();
|
||||
sendRpcReply(controller);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user