forked from qt-creator/qt-creator
Clang: Filter out connection errors
The connections server needs some time to start and so the first connect can be fail. Don't print an error in that case. Change-Id: I38fe5401cd47a4ad1a552dcbdfafcc851e5dd7cf Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
committed by
Nikolai Kosjar
parent
0511721313
commit
0e0f8b318e
@@ -155,8 +155,6 @@ void ConnectionClient::restartProcessIfTimerIsNotResettedAndSocketIsEmpty()
|
|||||||
|
|
||||||
bool ConnectionClient::connectToLocalSocket()
|
bool ConnectionClient::connectToLocalSocket()
|
||||||
{
|
{
|
||||||
QThread::msleep(30);
|
|
||||||
|
|
||||||
for (int counter = 0; counter < 1000; counter++) {
|
for (int counter = 0; counter < 1000; counter++) {
|
||||||
localSocket.connectToServer(connectionName());
|
localSocket.connectToServer(connectionName());
|
||||||
bool isConnected = localSocket.waitForConnected(20);
|
bool isConnected = localSocket.waitForConnected(20);
|
||||||
@@ -198,8 +196,9 @@ void ConnectionClient::killProcess()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConnectionClient::printLocalSocketError(QLocalSocket::LocalSocketError /*socketError*/)
|
void ConnectionClient::printLocalSocketError(QLocalSocket::LocalSocketError socketError)
|
||||||
{
|
{
|
||||||
|
if (socketError != QLocalSocket::ServerNotFoundError)
|
||||||
qWarning() << "ClangCodeModel ConnectionClient LocalSocket Error:" << localSocket.errorString();
|
qWarning() << "ClangCodeModel ConnectionClient LocalSocket Error:" << localSocket.errorString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user