title: node.js doesn't send socket on disconnect event
body: <p>When someone connects to the node server, I keep an array with all the sockets.
  That way I can broadcast messages to everyone whenever that is needed or loop through the users to count the number of online users, etc.</p>
  
  <p>All this works fine, but when a on disconnect event is fired, I don't receive a socket in my arguments.
  Is there another way to know which socket just disconnected?</p>
  
  <pre><code>var allClients = [];
  
  io.sockets.on('connection', function(socket) {
     allClients.push(socket);
  
     socket.on('disconnect', function(socket) {
        console.log('Got disconnect!');
  
        var i = allClients.indexOf(socket);
        delete allClients[i];
     });
  });
  </code></pre>
  
  <p>Of course the above example doesn't work, because disconnect event doesn't give a socket argument (or any other argument).
  So is there another event that fired before a disconnect where the socket is still there?</p>
  
  <p>Ali</p>