Call QLocalSocket::flush() after QLocalSocket::waitForBytesWritten()
This commit is contained in:
@@ -277,10 +277,10 @@ bool SingleApplicationPrivate::connectToPrimary(int timeout, ConnectionType conn
|
|||||||
|
|
||||||
socket_->write(header);
|
socket_->write(header);
|
||||||
socket_->write(initMsg);
|
socket_->write(initMsg);
|
||||||
|
bool result = socket_->waitForBytesWritten(timeout - time.elapsed());
|
||||||
socket_->flush();
|
socket_->flush();
|
||||||
if (socket_->waitForBytesWritten(timeout - time.elapsed())) return true;
|
|
||||||
|
|
||||||
return false;
|
return result;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -277,10 +277,10 @@ bool SingleCoreApplicationPrivate::connectToPrimary(int timeout, ConnectionType
|
|||||||
|
|
||||||
socket_->write(header);
|
socket_->write(header);
|
||||||
socket_->write(initMsg);
|
socket_->write(initMsg);
|
||||||
|
bool result = socket_->waitForBytesWritten(timeout - time.elapsed());
|
||||||
socket_->flush();
|
socket_->flush();
|
||||||
if (socket_->waitForBytesWritten(timeout - time.elapsed())) return true;
|
|
||||||
|
|
||||||
return false;
|
return result;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user