Clang: Fix potential infinite loop

Change-Id: I373a652db8811b0ebb416f5914aa4af12a23a3c9
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
This commit is contained in:
Nikolai Kosjar
2015-07-02 10:47:53 +02:00
committed by Marco Bubke
parent 8cb7d68cf6
commit b2ec03c74c

View File

@@ -99,8 +99,8 @@ bool ConnectionClient::isConnected() const
void ConnectionClient::ensureCommandIsWritten()
{
while (localSocket.bytesToWrite() > 0)
localSocket.waitForBytesWritten();
while (isConnected() && localSocket.bytesToWrite() > 0)
localSocket.waitForBytesWritten(50);
}
void ConnectionClient::sendEndCommand()