aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorItay Grudev <itay+github.com@grudev.com>2020-10-06 10:16:09 +0100
committerGitHub <noreply@github.com>2020-10-06 10:16:09 +0100
commit224f1d1734395874773d79d3f693c7cf7b857887 (patch)
tree109a9abe028d109657f14b12cb84a51dfb6dbc94
parentMerge pull request #110 from Kolcha/qt59-msvc (diff)
parentFix return value of connectToPrimary() when connect is successful (diff)
downloadsingleapplication-224f1d1734395874773d79d3f693c7cf7b857887.tar.xz
Merge pull request #111 from jonaski/connecttoprimary
Fix return value of connectToPrimary() when connect is successful
-rw-r--r--singleapplication_p.cpp5
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()