diff --git a/boswatch/network/client.py b/boswatch/network/client.py index 0c2909b..7c8cd3c 100644 --- a/boswatch/network/client.py +++ b/boswatch/network/client.py @@ -109,5 +109,7 @@ class TCPClient: self._sock.sendall(bytes(header + aliveMsg, "utf-8")) return True except socket.error as e: + if e.errno is 32: # broken pipe - no one will read from this pipe anymore + return False logging.error(e) return False diff --git a/networking.py b/networking.py new file mode 100644 index 0000000..e69de29 diff --git a/test/boswatch/test_ServerClient.py b/test/boswatch/test_ServerClient.py index c6b4f80..fecb1ae 100644 --- a/test/boswatch/test_ServerClient.py +++ b/test/boswatch/test_ServerClient.py @@ -173,7 +173,7 @@ def test_serverStopsWhileConnected(getRunningServer, getClient): getRunningServer.stop() timeout = 10 while getClient.isConnected: - print(timeout) + time.sleep(0.1) timeout = timeout - 1 if timeout is 0: assert 0