facebook/tornado — pull request #707 by protoss-player (2013-04-01 23:07:49+00:00)
Title: websocket_connect should not hang on HTTP errors

Current WebSocket client's implementation only expects 1xx codes in reply and sometimes hangs infinitely when the server says something else, e.g. 404.