Skip to content

Commit

Permalink
Do not attempt to stop process when it's not started
Browse files Browse the repository at this point in the history
Fixes #10015
  • Loading branch information
p0deje committed Nov 26, 2021
1 parent 612896f commit e3e492a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions rb/lib/selenium/webdriver/common/service_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def start

def stop
return unless @shutdown_supported
return if process_exited?

stop_server
@process.poll_for_exit STOP_TIMEOUT
Expand Down Expand Up @@ -109,15 +110,11 @@ def start_process
end

def stop_process
return if process_exited?

@process.stop STOP_TIMEOUT
@process.io.stdout.close if Platform.jruby? && !WebDriver.logger.debug?
end

def stop_server
return if process_exited?

connect_to_server do |http|
headers = WebDriver::Remote::Http::Common::DEFAULT_HEADERS.dup
http.get('/shutdown', headers)
Expand Down

0 comments on commit e3e492a

Please sign in to comment.