Bugs item #11060, was opened at 2007-05-23 00:06
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=11060&group_id=426

Category: Standard Library
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Riley Lynch (rlynch)
Assigned to: Nobody (None)
Summary: DRb won't reliably stop_service

Initial Comment:
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


----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=11060&group_id=426