quassel/quassel — pull request #104 by mamarley (2014-12-20 20:26:27+00:00)
Title: Fix potential state desync in disconnectFromIrc()

Previously, disconnectFromIrc() would assume that if the socket was
in any state other than ConnectedState that it was disconnected and
send the socketDisconnected() signal. However, if the socket was
in a different state, such as ConnectingState, this caused the
corenetwork state and the socket state to become desynchronized.
This patch causes disconnectFromIrc() to close the socket and
start the socketCloseTimer in the event that the socket is in a
state other than UnconnectedState or ConnectedState.