einaros/ws — pull request #209 by Aktau (2013-06-26 11:58:40+00:00)
Title: fix a request that hangs around after an unexpected response

In my setup, sometimes my node websocket server goes away. At that point nginx tells any further clients that there is a Bad Gateway (502). Of course the WebSocket client then errors out, but it forgets to abort the request. For websocket connections, nginx must be configured with a keep-alive value, so the connection can take a long time to time out. This ties up unnecesary resources.