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
 
188
 
189
 void PTSocket::setState(PTSocket::State s)
189
 void PTSocket::setState(PTSocket::State s)
190
 {
190
 {
191
+    if(s == m_state)
192
+        return;
193
+    if(s == Error)
194
+        abort();
191
     if(s == Handshaked)
195
     if(s == Handshaked)
192
         m_pingTimer.start();
196
         m_pingTimer.start();
193
     else
197
     else

Loading…
Cancel
Save