Browse Source

Handling of connection reset error

master
klonfish 8 years ago committed by klonfish
parent
commit
4a9238c110
  1. 3
      wii-pair/daemon.py

3
wii-pair/daemon.py

@ -173,6 +173,7 @@ try: @@ -173,6 +173,7 @@ try:
conn, addr = s.accept()
while True:
try:
m = conn.recv(1)
if len(m) == 0:
@ -193,6 +194,8 @@ try: @@ -193,6 +194,8 @@ try:
r += struct.pack('b', v)
conn.send(r)
except ConnectionResetError:
continue
except (KeyboardInterrupt, SystemExit):
t1.stop = True
t2.stop = True

Loading…
Cancel
Save