Improve error reporting on failure to connect to baseline server
(cherry picked from commit 9d75ff6fa8f8844ff6599b68618821cd8c501757)
This commit is contained in:
parent
978fc98bff
commit
c3ce002a54
@ -162,6 +162,7 @@ bool BaselineHandler::establishConnection()
|
||||
{
|
||||
if (!proto.acceptConnection(&plat)) {
|
||||
qWarning() << runId << logtime() << "Accepting new connection from" << proto.socket.peerAddress().toString() << "failed." << proto.errorMessage();
|
||||
proto.sendBlock(BaselineProtocol::Abort, proto.errorMessage().toLatin1()); // In case the client can hear us, tell it what's wrong.
|
||||
proto.socket.disconnectFromHost();
|
||||
return false;
|
||||
}
|
||||
|
@ -374,7 +374,7 @@ bool BaselineProtocol::connect(const QString &testCase, bool *dryrun)
|
||||
|
||||
Command cmd = UnknownError;
|
||||
if (!receiveBlock(&cmd, &block)) {
|
||||
errMsg += QLS("Failed to get response from server.");
|
||||
errMsg.prepend(QLS("Failed to get response from server. "));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user