websocket_connect: don't hang on HTTP errors