The problem is in double_disconnection_attempt_throws_exception.
There is a small window between the first disconnect being acknowledged and the server dropping the socket. If the second disconnect is written to the socket during this window then there is no error and no exception thrown. (The test is checking for this exception.)
The problem is in double_ disconnection_ attempt_ throws_ exception.
There is a small window between the first disconnect being acknowledged and the server dropping the socket. If the second disconnect is written to the socket during this window then there is no error and no exception thrown. (The test is checking for this exception.)