title: Socket.io error handling
body: <p>I am having a problem with Socket.IO.</p>
  
  <p>I am trying to reconnect the socket after the socket errors but it won't reconnect. Here is the code:</p>
  
  <pre><code>socket = io.connect(host, options);
  socket.on('connect', this.onConnect);
  socket.on('error', function() {
      //here i change options
      socket = io.connect(host, options);
  });
  </code></pre>
  
  <p>Why it doesn't it create the new connection? (The host and port are being kept constant and it works for the first connection).</p>