We modify our waitForServerDisconnect() test harness call to check whether a socket has been closed and, if it hasn’t, to wait for the disconnect event before returning. After struggling with socket.io’s miserable documentation, we figure out something that works... almost. The event doesn’t fire and the browser times out. What could be wrong?