WebSocket connection to 'ws://sockets.ny.stackexchange.com/' failed: Unexpected response code: 502
What this is telling you is that you're traffic is being intercepted by a proxy further up the chain. Usually this is the result of using a mobile connection of some sort. You can verify your web socket support here:
If you see that web socket support is available on port 80 it will work properly. If not sadly you're out of luck.