Disconnect an existing client connection when a second login is detected

There is no way for the server to queue things and wait for them before disconnecting the socket as various operations of the server runs concurrently.

One alternative is to introduce a delay between sending notification and closing the socket on the Runtime code. This should help ensure message delivery to the client.

Also I suggest taking a look at this forum post: