title: Node Socket.io client thinks it is disconnected after it has connected
body: <p>My socket will connect but can't receive messages in either direction. I set up the logging shown below. On the server side I see connections being logged, and disconnections logged when the page is closed. If I kill the server, the client logs "Socket disconnected." But no emissions going either direction are received. I did some more logging and determined that the client socket's <code>socket.connected</code> field is <code>false</code>.</p>
  
  <p>At this point I'm at a total loss. Literally as soon as I make a connection, the client thinks that its socket is disconnected, but the server still sees it disconnect when I close the browser window. I'm running socket.io 1.1.0. Thanks for any help!</p>
  
  <p>Server:</p>
  
  <pre><code>io.sockets.on('connection', function(socket) {
    logger.info('Socket connected. ID: ' + socket.id);
  
    socket.on('refresh', function() { 
      logger.info('Refresh received from ID: ' + socket.id);
    });
    socket.on('disconnect', function() { 
      logger.info('Disconnect received from ID: ' socket.id);
    });
  });
  </code></pre>
  
  <p>Client:</p>
  
  <pre><code>var socket;
  $(document).ready(function() {
    socket = io.connect('http://localhost');
    console.log(socket.connected);
  
    socket.emit('refresh');
  
    socket.on('disconnect', function() {
      console.log("Socket disconnected.");
    });
  });
  </code></pre>