Join GitHub today
Client loses connection upon ping/pong #74
I was trying to investigate why browsers would lose connection to the push server exactly every minute.
Chrome and Firefox are reconnecting almost instantly, Internet Explorer errors out and won't reconnect.
I had HAProxy in front first and then moved to a dedicated Nginx (with tcp proxy support) instance, in the hope to mitigate this issue, but it remains the same. If I connect to the slanger instance directly the problem is not there.
However it turns out to be the ping/pong mechanism that makes the client disconnect when slanger is behind haproxy/nginx/whatever. I'm not still entirely sure what's up with that, but any other push message works perfectly.
Is there something particular about those ping/pong messages that I should be looking for?
the problem can also be observed by leaving slanger on an instance behind a simple elastic load balancer with TCP protocol.
Set Slanger to start on 5011 and map the load balancer from 80 (tcp) to 5011 (tcp). Every ping the client receives it will disconnect.