Following on from this question, I am trying to set a variable to see if a socket is connected.
However the question's answer doesnt seem to work. If I console.log the socket variable I get this:
As you can see in the image, it says connected: true
but when I run this:
console.log(socket.connected);
I simply get false. The start of my code looks like this:
var socket = io('http://test.domain.net:1234', {reconnection: false});
console.log("Connected:" + socket.connected);