title: Socket.io - Manual reconnect after client-side disconnect
body: <p>I use <code>node.js</code> and <code>socket.io</code> to create a real time web application. I will give the users full control of the socket connection, like manual disconnect and (re)connect.</p>
  
  <pre><code>function socket_connect()
  {
      console.log('func socket_connect');
      socket = io.connect('http://url/to/the/app');
  }
  
  function socket_reconnect()
  {
      console.log('func socket_reconnect');
      socket_connect();
  }
  
  function socket_disconnect ()
  {
      console.log('func socket_disconnect');
      if (socket) socket.disconnect();
  }
  </code></pre>
  
  <p>On client start up the <code>socket_connect()</code> function works fine, but after using <code>socket.disconnect()</code>, no new connection starts.</p>