title: Socket.io-client on node.js works only once
body: <p>I want to create new sockei.io-client on the server side (with node.js) every time when server gets request. But the code below works only once and then sockei.io-client does't response. Application doesn't stop, no errors.</p>
  
  <pre><code>var http = require("http");
  
  
  http.createServer(function(request, response) {
  
  var io = require('socket.io-client'); 
  localSocket = io.connect('http://localhost:9876/');
  localSocket.on('connect', function (data) {
                           response.writeHead(200, {"Content-type": "text/plain"});
                           response.write(data.name);
                           response.end();
                           localSocket.disconnect();
         });
  
  
  }).listen(8080);
  </code></pre>
  
  <p>Socket.io server (on localhost:9876) works well - it serves clients with names (which is</p>
  
  <pre><code> data.name
  </code></pre>
  
  <p>in the code here).</p>
  
  <p>What is wrong?</p>
  
  <p><b>UPDATE:</b> The problem is solved by myself: To run multiple connection for socket.io-client need to add connect option {'force new connection': true}, like that: </p>
  
  <pre><code>localSocket = io.connect('http://localhost:9876/', {'force new connection': true});
  </code></pre>
  
  <p>Thank you!</p>