Use socket.io 1.x
Handle error on setup process
Remove needless operation after error