Skip to content

Commit

Permalink
Fix multicast binding on Windows.
Browse files Browse the repository at this point in the history
Signed-off-by: Darrel Griët <[email protected]>
  • Loading branch information
JamesMTSloan authored and d-griet committed Jan 19, 2024
1 parent 72a2e31 commit a7b6a23
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion openhtf/util/multicast.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@ def run(self):
else:
self._sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR,
1) # Allow multiple listeners to bind.
self._sock.bind((self.address, self.port))
if sys.platform == 'win32':
self._sock.bind(('', self.port))
else:
self._sock.bind((self.address, self.port))

while self._live:
try:
Expand Down

0 comments on commit a7b6a23

Please sign in to comment.