Merge unC0Rr's broken preview fix
authorWuzzy <Wuzzy2@mail.ru>
Wed, 14 Mar 2018 23:02:39 +0100
changeset 13216 667f28278aa4
parent 13215 25ebc1ac0967 (current diff)
parent 13213 fcffacc6ee8f (diff)
child 13217 e9e4cc867b6e
Merge unC0Rr's broken preview fix
--- a/QTfrontend/net/tcpBase.cpp	Wed Mar 14 23:02:11 2018 +0100
+++ b/QTfrontend/net/tcpBase.cpp	Wed Mar 14 23:02:39 2018 +0100
@@ -228,8 +228,10 @@
 {
     Q_UNUSED(exitStatus);
 
-    if(m_connected)
-      ClientDisconnect();
+    if(!m_connected) { // yes, it is intended to be like this
+      ClientDisconnect(); // need to do cleanup in case no connection occured,
+      //if m_connected is true, it is done automatically in socket disconnect handler
+    }
 
     // show error message if there was an error that was not an engine's
     // fatal error - because that one already sent a info via IPC