Index: telemetry/third_party/websocket-client/websocket.py |
diff --git a/telemetry/third_party/websocket-client/websocket.py b/telemetry/third_party/websocket-client/websocket.py |
index 70f0260d30c661837765cc02cad5ffe7d7bebd75..8efc4a00caacdb4d7fc4a0a4705c449cc809d23d 100644 |
--- a/telemetry/third_party/websocket-client/websocket.py |
+++ b/telemetry/third_party/websocket-client/websocket.py |
@@ -452,6 +452,12 @@ class WebSocket(object): |
else: |
raise WebSocketException("SSL not available.") |
+ print "STARTING HANDSHAKE: %s" % time.time() |
+ print " hostname: %s" % hostname |
+ print " port: %s" % port |
+ print " START TRACEBACK" |
+ import traceback; traceback.print_stack() |
+ print "END TRACEBACK" |
self._handshake(hostname, port, resource, **options) |
def _handshake(self, host, port, resource, **options): |
@@ -489,6 +495,7 @@ class WebSocket(object): |
status, resp_headers = self._read_headers() |
if status != 101: |
+ print "FAILED HANDSHAKE: %s" % time.time() |
self.close() |
raise WebSocketException("Handshake Status %d" % status) |
@@ -497,6 +504,7 @@ class WebSocket(object): |
self.close() |
raise WebSocketException("Invalid WebSocket Header") |
+ print "HANDSHAKE SUCCEEDED" |
self.connected = True |
def _validate_header(self, headers, key): |