title: socket.io automatically disconnects socket
body: <p>I keep getting this error in the developer console when I run socket.io in electron. </p>
  
  <pre><code>engine.io-client:socket probe transport "websocket" failed because of error: transport closed +6s
  </code></pre>
  
  <p>When I establish it the socket always disconnects right away. My client doesn't even get the socket.emit I do as soon as the connection is established until after a minute or two. </p>
  
  <p>The client and server are on the same version of socket.io.</p>
  
  <p>Server:</p>
  
  <pre><code>io.on('connection', function(socket){
    socket.emit('got it','');
    console.log('Socket connection established');
  });
  </code></pre>
  
  <p>Client:</p>
  
  <pre><code>var socket = require('socket.io-client')('http://localhost:3000');
  console.log(socket);
  socket.on('got it', function(a){
    console.log('connected');
    console.log(socket);
  })
  </code></pre>
  
  <p>This isn't the complete code but there's nothing else that interacts with websockets except some other listeners which shouldn't affect the connection.</p>
  
  <p>The server isn't showing any issues. It tells me every time someone connects but when I try to emit anything either way the recipient won't get it right away. I see "emitting packet with ack id x" every time I click the button that sends an emit, but the server doesn't see it. This issue is intermittent as if I wait a bit the server and client will be able to connect, but they still disconnect randomly after some time.</p>