title: Nodejs+socket.io : Prevent fallback to xhr-polling after reconnect to worker process (cluster module)
body: <p>I am using <a href="http://nodejs.org/api/cluster.html" rel="nofollow noreferrer">cluster</a> module to fork a new worker every time a worker process dies. My node server and client communicate over websockets (socket.io). What I see is that after a worker dies and the client connects to a new worker process, the communication occasionally falls back to xhr-polling. </p>
  
  <p>So before a worker dies: websockets.</p>
  
  <p>After a worker dies: xhr-polling (sometimes. But why ?. I do a see handshake errors upon reconnect when this happens)</p>
  
  <p>I have configured the transport option to use 'websocket' only, but this does not seem to help.</p>
  
  <p>I also tried configuring the parameters mentioned below, as suggested <a href="https://stackoverflow.com/questions/4420393/nodejs-socket-io-chrome-not-loading-with-websockets">here</a>. But this did not help either. I still see occasional fallback to xhr-polling after a reconnect to a new worker. </p>
  
  <ul>
  <li>tryTransportsOnConnectTimeout - default value is true</li>
  <li>rememberTransport - default value is true</li>
  </ul>
  
  <p>Any idea how I can force the use websockets only ?</p>
  
  <p>Thanks in advance.</p>