1
0
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:
Jonas Kvinge 2020-10-05 22:05:37 +02:00
parent 616875d0d2
commit eec4b2cc0e
2 changed files with 4 additions and 4 deletions

View File

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

View File

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