1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2025-01-20 12:39:01 +01:00

Fix return value of sendMessage()

This commit is contained in:
Jonas Kvinge 2019-05-20 18:39:49 +02:00
parent 36807fd376
commit 8576afe6f5
2 changed files with 4 additions and 4 deletions

View File

@ -169,7 +169,7 @@ bool SingleApplication::sendMessage( QByteArray message, int timeout )
d->connectToPrimary( timeout, SingleApplicationPrivate::Reconnect ); d->connectToPrimary( timeout, SingleApplicationPrivate::Reconnect );
d->socket->write( message ); d->socket->write( message );
bool dataWritten = d->socket->flush(); bool dataWritten = d->socket->waitForBytesWritten( timeout );
d->socket->waitForBytesWritten( timeout ); d->socket->flush();
return dataWritten; return dataWritten;
} }

View File

@ -169,7 +169,7 @@ bool SingleCoreApplication::sendMessage( QByteArray message, int timeout )
d->connectToPrimary( timeout, SingleCoreApplicationPrivate::Reconnect ); d->connectToPrimary( timeout, SingleCoreApplicationPrivate::Reconnect );
d->socket->write( message ); d->socket->write( message );
bool dataWritten = d->socket->flush(); bool dataWritten = d->socket->waitForBytesWritten( timeout );
d->socket->waitForBytesWritten( timeout ); d->socket->flush();
return dataWritten; return dataWritten;
} }