Skip to content
Snippets Groups Projects
Commit 6cc476ac authored by Sybren A. Stüvel's avatar Sybren A. Stüvel
Browse files

SSDP discovery: fixed Windows compatibility

parent 631c9a23
Branches
Tags
No related merge requests found
...@@ -10,6 +10,7 @@ changed functionality, fixed bugs). ...@@ -10,6 +10,7 @@ changed functionality, fixed bugs).
to edit `flamenco-worker.cfg`. to edit `flamenco-worker.cfg`.
- Only fail UPnP/SSDP discovery when it fails to send on both IPv4 and IPv6. - Only fail UPnP/SSDP discovery when it fails to send on both IPv4 and IPv6.
- Creating distribution files using [PyInstaller](http://www.pyinstaller.org/). - Creating distribution files using [PyInstaller](http://www.pyinstaller.org/).
- Fixed UPnP/SSDP discovery issues on Windows.
## Version 2.0.7 (released 2017-07-04) ## Version 2.0.7 (released 2017-07-04)
......
...@@ -67,8 +67,14 @@ def find_flamenco_manager(timeout=1, retries=5): ...@@ -67,8 +67,14 @@ def find_flamenco_manager(timeout=1, retries=5):
except OSError: except OSError:
# Not supported on Windows and AF_INET6. # Not supported on Windows and AF_INET6.
pass pass
sock.bind(('', 1901)) sock.bind(('', 1901))
# Required on Windows, otherwise the message won't go out.
if family == socket.AF_INET:
host = socket.gethostbyname(socket.gethostname())
sock.setsockopt(socket.SOL_IP, socket.IP_MULTICAST_IF, socket.inet_aton(host))
try: try:
for _ in range(2): for _ in range(2):
# sending it more than once will # sending it more than once will
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment