diff --git a/tornado/websocket.py b/tornado/websocket.py
index <HASH>..<HASH> 100644
--- a/tornado/websocket.py
+++ b/tornado/websocket.py
@@ -746,6 +746,9 @@ class WebSocketClientConnection(simple_httpclient._HTTPConnection):
     def _on_close(self):
         self.on_message(None)
 
+    def _on_body(self, body):
+        self.connect_future.set_exception(Exception('Could not connect.'))
+
     def _handle_1xx(self, code):
         assert code == 101
         assert self.headers['Upgrade'].lower() == 'websocket'
websocket_connect: don't hang on HTTP errors