Improve error reporting on failure to connect to baseline server

(cherry picked from commit 9d75ff6fa8f8844ff6599b68618821cd8c501757)
This commit is contained in:
aavit 2011-04-11 15:34:06 +02:00 committed by Olivier Goffart
parent 978fc98bff
commit c3ce002a54
2 changed files with 2 additions and 1 deletions

View File

@ -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;
}

View File

@ -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;
}