lib/spork/server.rb in spork-0.7.3 vs lib/spork/server.rb in spork-0.7.4
- old
+ new
@@ -20,9 +20,10 @@
new(options).listen
end
# Sets up signals and starts the DRb service. If it's successful, it doesn't return. Not ever. You don't need to override this.
def listen
+ raise RuntimeError, "you must call Spork.using_spork! before starting the server" unless Spork.using_spork?
trap("SIGINT") { sig_int_received }
trap("SIGTERM") { abort; exit!(0) }
trap("USR2") { abort; restart } if Signal.list.has_key?("USR2")
@drb_service = DRb.start_service("druby://127.0.0.1:#{port}", self)
Spork.each_run { @drb_service.stop_service }