Skip to content

Commit e3e492a

Browse files
committed
Do not attempt to stop process when it's not started
Fixes #10015
1 parent 612896f commit e3e492a

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

rb/lib/selenium/webdriver/common/service_manager.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ def start
6060

6161
def stop
6262
return unless @shutdown_supported
63+
return if process_exited?
6364

6465
stop_server
6566
@process.poll_for_exit STOP_TIMEOUT
@@ -109,15 +110,11 @@ def start_process
109110
end
110111

111112
def stop_process
112-
return if process_exited?
113-
114113
@process.stop STOP_TIMEOUT
115114
@process.io.stdout.close if Platform.jruby? && !WebDriver.logger.debug?
116115
end
117116

118117
def stop_server
119-
return if process_exited?
120-
121118
connect_to_server do |http|
122119
headers = WebDriver::Remote::Http::Common::DEFAULT_HEADERS.dup
123120
http.get('/shutdown', headers)

0 commit comments

Comments
 (0)