socket.io in node.js: socket.emit doesn't complete before socket.disconnect

I'm trying to use node.js as a server with socket.io (over a https connection server object, client connecting with option secure: true) with a JavaScript front end.

On the server if a login attempt fails I am calling:

socket.emit('unauthorized');
socket.disconnect();

On the client side I have:

this.Socket = io.connect(server, { secure: true });
this.Socket.on('disconnect', this.Socket_Disconnect);
this.Socket.on('unauthorized', this.Socket_Unauthorized);

I am able to see the disconnect event firing (with arguments set as ['booted'] regardless of whether i pass any arguments to socket.disconnect(), but the unauthorized event never makes it. Am I attempting to pass this message the wrong way?

The rationale I have here is that I want to be able to send different types of disconnect events like:

logout - clients should stop trying to connect until a user logs in

server reboot - clients should reattempt connection until they get through

I need to be able to tell on the client side why a client was disconnected by the server, is there at least some way to make sure a message has sent before calling socket.disconnect()?

Edit: this appears specific to the node.js cluster code - when the application is run on a single thread it works as expected.

Solved this by setting up a Redis server and configuring socket.io to use it within node.js if anyone finds this looking for a solution to the issue.