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->socket->write( message );
bool dataWritten = d->socket->flush();
d->socket->waitForBytesWritten( timeout );
bool dataWritten = d->socket->waitForBytesWritten( timeout );
d->socket->flush();
return dataWritten;
}

View File

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