Fix broken previews for me, pepper with comments on logic. Probably makes it fail for windows users again.
authorunc0rr
Wed, 14 Mar 2018 22:57:31 +0100
changeset 13208 fcffacc6ee8f
parent 13207 d948d39e5da8
child 13211 667f28278aa4
Fix broken previews for me, pepper with comments on logic. Probably makes it fail for windows users again.
QTfrontend/net/tcpBase.cpp
--- a/QTfrontend/net/tcpBase.cpp	Wed Mar 14 21:46:07 2018 +0100
+++ b/QTfrontend/net/tcpBase.cpp	Wed Mar 14 22:57:31 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