Skip to content

Commit

Permalink
Avoid discovery flooding. (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
syssi authored and rytilahti committed Sep 13, 2017
1 parent 3266e0f commit 6744fcb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mirobo/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,7 @@ def discover(addr: str=None) -> Any:
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
s.settimeout(timeout)
for _ in range(3):
s.sendto(helobytes, (addr, 54321))
s.sendto(helobytes, (addr, 54321))
while True:
try:
data, addr = s.recvfrom(1024)
Expand Down

0 comments on commit 6744fcb

Please sign in to comment.