ignore I/O error on sync paket sending
Stefan Schuermans

Stefan Schuermans commited on 2018-09-30 16:49:54
Showing 1 changed files, with 3 additions and 0 deletions.

... ...
@@ -17,7 +17,10 @@ name_b = name.encode("utf-8")
17 17
 while True:
18 18
     pos_ms = round(pos * 1000)
19 19
     data = b"PoSy" + struct.pack("!I64sI", flags, name_b, pos_ms)
20
+    try:
20 21
         sock.send(data)
22
+    except IOError:
23
+        pass
21 24
     pos += 1.0
22 25
     time.sleep(1)
23 26
 sock.close()
24 27