From 55fb3298bc7d327c8c8ac7e0c2463a1ee0290e4e Mon Sep 17 00:00:00 2001 From: Vincent Landgraf Date: Wed, 24 Jul 2013 08:28:34 +0200 Subject: [PATCH] Use localhost otherwise it will not work if localhost resolves to ::1 (IPv6) On my mac the `localhost` resolves to `::1` which leads to problem in communication problem if one side tries to connect to `lacalhost` and the other side to `::1`. The best solution is if all parties use localhost for there communication. See also: https://github.com/rspec/rspec-core/pull/1018 --- lib/spork/server.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spork/server.rb b/lib/spork/server.rb index 9b22bcc..4e3bd21 100644 --- a/lib/spork/server.rb +++ b/lib/spork/server.rb @@ -27,7 +27,7 @@ def listen 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) + @drb_service = DRb.start_service("druby://localhost:#{port}", self) Spork.each_run { @drb_service.stop_service } if @run_strategy.class == Spork::RunStrategy::Forking stderr.puts "Spork is ready and listening on #{port}!" stderr.flush