diff --git a/lib/puma/cli.rb b/lib/puma/cli.rb index ef1bbc9d..73c0adb9 100644 --- a/lib/puma/cli.rb +++ b/lib/puma/cli.rb @@ -172,10 +172,6 @@ module Puma end end - if server.attempt_bonjour(@rackup) - log "* Announced services via bonjour" - end - log "Use Ctrl-C to stop" begin diff --git a/lib/puma/server.rb b/lib/puma/server.rb index 0be976c9..a822693f 100644 --- a/lib/puma/server.rb +++ b/lib/puma/server.rb @@ -500,41 +500,5 @@ module Puma @thread.join if @thread && sync end - - # If the dnssd gem is installed, advertise any TCPServer's configured - # out via bonjour. - # - # +name+ is the host name to use when advertised. - # - def attempt_bonjour(name) - begin - require 'dnssd' - rescue LoadError - return false - end - - @bonjour_registered = false - announced = false - - @ios.each do |io| - if io.kind_of? TCPServer - fixed_name = name.gsub(/\./, "-") - - DNSSD.announce io, "puma - #{fixed_name}", "http" do |r| - @bonjour_registered = true - end - - announced = true - end - end - - return announced - end - - # Indicate if attempt_bonjour worked. - # - def bonjour_registered? - @bonjour_registered ||= false - end end end