Closed msakai closed 4 years ago
I'll have a look, in the meantime, what happens when you use the multiplex servertype instead of the threaded one?
Ah, well yes. This is expected behavior of the threaded server. If you use the multiplex server type, you will see a ConnectionClosedError at the last call.
Why not with the threaded server? Because you shut down the daemon, but keep the proxy connection open to the still-running server thread. The thread won't go away until you close the proxy. You can verify this by trying to create a new proxy and call the method, or by releasing your current one and calling the method again (thereby making Pyro attempt to reconnect). In both cases you will now get a ConnectionClosedError / CommunicationError.
It's not possible to cleanly abort a running thread, so Pyro doesn't try to.
I and my colleague @keisuke-nakata noticed that once a proxy object is connected it can be used to invoke methods even after a daemon is shut down.
Is this intended behavior? If so, is there a way to shut down all connections and worker threads? If not, I guess that once a daemon is shut down
Daemon.handleRequest
should reject further requests andClientConnectionJob
should terminate itself.