Explorar el Código

abort in error

master
robin hace 10 años
padre
commit
f380e29ca9
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4
    0
      libptsocket/ptsocket.cpp

+ 4
- 0
libptsocket/ptsocket.cpp Ver fichero

@@ -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…
Cancelar
Guardar