Skip to content

Commit 197448e

Browse files
committed
[test] Fix WebsockifyServerHarness on ipv6 enabled machine. NFC
The test_nodejs_sockets_echo_subprotocol_runtime test was failing on my machine because node was resolving "localhost" to the IPv6 address ::1 but the websockify server was running on the IPv4 address 127.0.0.1.
1 parent 7cff758 commit 197448e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/test_sockets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def __enter__(self):
6565

6666
# start the websocket proxy
6767
print('running websockify on %d, forward to tcp %d' % (self.listen_port, self.target_port), file=sys.stderr)
68-
wsp = websockify.WebSocketProxy(verbose=True, listen_port=self.listen_port, target_host="127.0.0.1", target_port=self.target_port, run_once=True)
68+
wsp = websockify.WebSocketProxy(verbose=True, source_is_ipv6=True, listen_port=self.listen_port, target_host="127.0.0.1", target_port=self.target_port, run_once=True)
6969
self.websockify = multiprocessing.Process(target=wsp.start_server)
7070
self.websockify.start()
7171
self.processes.append(self.websockify)

0 commit comments

Comments
 (0)