diff options
author | Itay Grudev <itay+github.com@grudev.com> | 2020-10-06 10:16:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-06 10:16:09 +0100 |
commit | 224f1d1734395874773d79d3f693c7cf7b857887 (patch) | |
tree | 109a9abe028d109657f14b12cb84a51dfb6dbc94 | |
parent | Merge pull request #110 from Kolcha/qt59-msvc (diff) | |
parent | Fix return value of connectToPrimary() when connect is successful (diff) | |
download | singleapplication-224f1d1734395874773d79d3f693c7cf7b857887.tar.xz |
Merge pull request #111 from jonaski/connecttoprimary
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() |