Skip to content
Permalink
Browse files

Fix Windows support

In Windows socket don't have the MSG_DONTWAIT attribute.
See Stackoverflow post for more info: https://stackoverflow.com/questions/54071217/attributeerror-module-socket-has-no-attribute-msg-dontwait
  • Loading branch information
assafnativ committed Jan 21, 2020
1 parent eeca01d commit e871a8c1f1f9470abf1ee832ed45b2ba07d8b73b
Showing with 2 additions and 1 deletion.
  1. +2 −1 idarling/shared/discovery.py
@@ -81,8 +81,9 @@ def _send_request(self):
request = request.encode("utf-8")
while len(request):
try:
self._socket.setblocking(0)
sent = self._socket.sendto(
request, socket.MSG_DONTWAIT, ("<broadcast>", 31013)
request, 0, ("<broadcast>", 31013)
)
request = request[sent:]
except socket.error as e:

0 comments on commit e871a8c

Please sign in to comment.
You can’t perform that action at this time.