diff --git a/3rdparty/singleapplication/singleapplication.cpp b/3rdparty/singleapplication/singleapplication.cpp index 99174bcc9..f400a5e2a 100644 --- a/3rdparty/singleapplication/singleapplication.cpp +++ b/3rdparty/singleapplication/singleapplication.cpp @@ -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; } diff --git a/3rdparty/singleapplication/singlecoreapplication.cpp b/3rdparty/singleapplication/singlecoreapplication.cpp index b9dcddc7c..498d2b34b 100644 --- a/3rdparty/singleapplication/singlecoreapplication.cpp +++ b/3rdparty/singleapplication/singlecoreapplication.cpp @@ -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; }