websocket_connect: don't hang on HTTP errors
tests: test for websocket_connect failure
Merge pull request #707 from protoss-player/master

websocket_connect should not hang on HTTP errors