aboutsummaryrefslogtreecommitdiff
path: root/test/test_socks.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_socks.py')
-rw-r--r--test/test_socks.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/test_socks.py b/test/test_socks.py
index 68af19d0c..f601fc8a5 100644
--- a/test/test_socks.py
+++ b/test/test_socks.py
@@ -216,7 +216,9 @@ class SocksWebSocketTestRequestHandler(SocksTestRequestHandler):
protocol = websockets.ServerProtocol()
connection = websockets.sync.server.ServerConnection(socket=self.request, protocol=protocol, close_timeout=0)
connection.handshake()
- connection.send(json.dumps(self.socks_info))
+ for message in connection:
+ if message == 'socks_info':
+ connection.send(json.dumps(self.socks_info))
connection.close()