From 64a53b69a2be800efd440600fac419c919007379 Mon Sep 17 00:00:00 2001 From: klonfish Date: Tue, 27 Dec 2016 19:51:13 +0100 Subject: [PATCH] Catch if nothing has been read from the socket --- wii-pair/daemon.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wii-pair/daemon.py b/wii-pair/daemon.py index eef1002..34cd010 100755 --- a/wii-pair/daemon.py +++ b/wii-pair/daemon.py @@ -189,6 +189,10 @@ try: conns.remove(sock) continue + if len(m) == 0: + conns.remove(sock) + continue + r = b'' for w in wiis: if m[0] == ord('w'):