Skip to content

Commit 33dd190

Browse files
committed
Only bind mock server on localhost
Some application firewall (the one of MacOS at least) will show a notification when an application bind on all address. Using localhost for binding avoid this notification.
1 parent b7cc900 commit 33dd190

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/paho_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def bind_to_any_free_port(sock) -> int:
2727
"""
2828
while True:
2929
try:
30-
sock.bind(('', 0))
30+
sock.bind(('localhost', 0))
3131
return sock.getsockname()[1]
3232
except OSError:
3333
pass

0 commit comments

Comments
 (0)