Fix return value of sendMessage()
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user