mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2025-01-19 04:00:40 +01:00
Call QLocalSocket::flush() after QLocalSocket::waitForBytesWritten()
This commit is contained in:
parent
616875d0d2
commit
eec4b2cc0e
@ -277,10 +277,10 @@ bool SingleApplicationPrivate::connectToPrimary(int timeout, ConnectionType conn
|
||||
|
||||
socket_->write(header);
|
||||
socket_->write(initMsg);
|
||||
bool result = socket_->waitForBytesWritten(timeout - time.elapsed());
|
||||
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(initMsg);
|
||||
bool result = socket_->waitForBytesWritten(timeout - time.elapsed());
|
||||
socket_->flush();
|
||||
if (socket_->waitForBytesWritten(timeout - time.elapsed())) return true;
|
||||
|
||||
return false;
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user