@@ -188,7 +188,7 @@ void PTSocket::m_socketError(QAbstractSocket::SocketError)
void PTSocket::setState(PTSocket::State s)
{
- if(s == m_state || (s == Error && m_state == Disconnected))
+ if(s == m_state || (s == Error && (m_state == Disconnected || m_state == Disconnecting)))
return;
if(s == Error)
abort();