diff options
author | Jonas Kvinge <jonas@jkvinge.net> | 2020-10-05 22:13:03 +0200 |
---|---|---|
committer | Jonas Kvinge <jonas@jkvinge.net> | 2020-10-05 22:13:03 +0200 |
commit | a121f61ca1e7703f90d78c606bdc40de9ad344cf (patch) | |
tree | 109a9abe028d109657f14b12cb84a51dfb6dbc94 | |
parent | Merge pull request #110 from Kolcha/qt59-msvc (diff) | |
download | singleapplication-a121f61ca1e7703f90d78c606bdc40de9ad344cf.tar.xz |
Fix return value of connectToPrimary() when connect is successful
-rw-r--r-- | singleapplication_p.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/singleapplication_p.cpp b/singleapplication_p.cpp index 4d74e06..3b41391 100644 --- a/singleapplication_p.cpp +++ b/singleapplication_p.cpp @@ -267,10 +267,9 @@ bool SingleApplicationPrivate::connectToPrimary( int timeout, ConnectionType con socket->write( header ); socket->write( initMsg ); + bool result = socket->waitForBytesWritten( timeout - time.elapsed() ); socket->flush(); - if( socket->waitForBytesWritten( timeout - time.elapsed() )) return true; - - return false; + return result; } quint16 SingleApplicationPrivate::blockChecksum() |