diff --git a/singleapplication.cpp b/singleapplication.cpp index a797231..bc9e059 100644 --- a/singleapplication.cpp +++ b/singleapplication.cpp @@ -168,7 +168,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; }