`io.set('transports', [ 'websocket', 'htmlfile', 'xhr-polling', 'jsonp-polling', 'flashsocket' ]);` 'flashsocket' must be added to socketIO's transports. Otherwise it will close the socket immediately.