Browse Source

abort in error

master
robin 11 years ago
parent
commit
f380e29ca9
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      libptsocket/ptsocket.cpp

+ 4
- 0
libptsocket/ptsocket.cpp View File

@@ -188,6 +188,10 @@ void PTSocket::m_socketError(QAbstractSocket::SocketError)
188 188
 
189 189
 void PTSocket::setState(PTSocket::State s)
190 190
 {
191
+    if(s == m_state)
192
+        return;
193
+    if(s == Error)
194
+        abort();
191 195
     if(s == Handshaked)
192 196
         m_pingTimer.start();
193 197
     else

Loading…
Cancel
Save