Skip to content

Commit 1fcb06c

Browse files
committed
Make sure Ruby properly kills Firefox process if silent startup times out.
Thanks to birtic for the patch. Fixes issue 7392.
1 parent 6a7bb83 commit 1fcb06c

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

rb/CHANGES

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2.43.0 (???)
2+
============
3+
4+
* Firefox
5+
- Make sure browser process is properly killed if silent startup hangs (#7392)
6+
17
2.42.0 (2014-05-23)
28
===================
39

rb/lib/selenium/webdriver/firefox/binary.rb

+8-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,14 @@ def quit
4444
end
4545

4646
def wait
47-
@process.poll_for_exit(WAIT_TIMEOUT) if @process
47+
return unless @process
48+
49+
begin
50+
@process.poll_for_exit(WAIT_TIMEOUT)
51+
rescue ChildProcess::TimeoutError => e
52+
@process.stop
53+
raise e
54+
end
4855
end
4956

5057
private

0 commit comments

Comments
 (0)