Fix return value of connectToPrimary() when connect is successful

This commit is contained in:
Jonas Kvinge 2020-10-05 22:13:03 +02:00
parent 26ed3486f9
commit a121f61ca1

View File

@ -267,10 +267,9 @@ bool SingleApplicationPrivate::connectToPrimary( int timeout, ConnectionType con
socket->write( header ); socket->write( header );
socket->write( initMsg ); socket->write( initMsg );
bool result = socket->waitForBytesWritten( timeout - time.elapsed() );
socket->flush(); socket->flush();
if( socket->waitForBytesWritten( timeout - time.elapsed() )) return true; return result;
return false;
} }
quint16 SingleApplicationPrivate::blockChecksum() quint16 SingleApplicationPrivate::blockChecksum()