Skip to content

Commit

Permalink
[rb] server does not support shutdown endpoint, can only end the process
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed Jul 2, 2023
1 parent fea7c9d commit 124be0b
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions rb/lib/selenium/server.rb
Expand Up @@ -208,12 +208,6 @@ def start
end

def stop
begin
Net::HTTP.get(@host, '/selenium-server/driver/?cmd=shutDownSeleniumServer', @port)
rescue Errno::ECONNREFUSED
nil
end

stop_process if @process
poll_for_shutdown

Expand All @@ -235,13 +229,7 @@ def <<(arg)
private

def stop_process
return unless @process.alive?

begin
@process.poll_for_exit(5)
rescue WebDriver::ChildProcess::TimeoutError
@process.stop
end
@process.stop
rescue Errno::ECHILD
# already dead
ensure
Expand Down

0 comments on commit 124be0b

Please sign in to comment.