tomerfiliba/rpyc — pull request #113 by jviereck (2013-06-25 13:12:54+00:00)
Title: Ensure the server termiantes once it is no longer active

Starting a `ThreadedServer` from within a thread, I need to close/terminate the server by calling `close()` on it. However, the current implementation keeps the `ThreadedServer` running, even if its `active` state changes from `True` to `False`.

The following patch fixes this. Note that I had to introduce a `self.listener.settimeout(0.5) `, such that the while loop in `def accept(self):` can check for `self.active == False` from time to time.