Because of the way that DRb caches a DRbServer instance in @primary_server (whether instantiated via DRb::start_service,
or in some cases, DRbServer.new), you cannot be sure that your service will be entirely stopped: If the DRbServer is
cached in @primary_server, it will continue to serve local requests, even after server.stop_service has been issued.
DRb::stop_service guarantees to clear @primary_server, but at the cost of stopping whatever service has been installed
there. (Which depends on the order of instantiation, and which instantiation method was used.)
For now, to avoid surprises, I'm manually clearing this variable after instantiating a service:
server = DRb::DRbServer.new(uri, Front.new)
DRb.primary_server = nil
|