Replaced disconnected with disconnect event since it actually gets fired when a client disconnects unlike disconnected. Running the server with the debugger results in a situation in which disconnecting clients cause the server to become unresponsive for some reason.