Socket.io connected the first time, but after disconnected, I couldn't connect again manually.
For me, the flags 'force new connection' and 'forceNew' wasn't working properly like some places says it should, and I couldn't find any way around it. Using socket.io 1.3.5, this is what I did to fix it:
var once = false;
function getSocket(){
var socket = io({path: '/socket.io'}, {'force new connection':true});
// this part here does the trick
if(once){
socket.connected = false;
socket.connect();
socket.removeAllListeners();
}
once = true;
return socket;
}