You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suppose I invoke Headless.run(display: pick-a-display(), autopick: true) do ... end, so that I specify both an initial guess for a display, and ask Headless to handle the rest. My server, for whatever the reason, currently has a particular display that consistently responds with "Cannot establish any listening sockets". (I don't know why; there are no Xvfb processes running at all. But that's beside the point right now...) So if pick-a-display() happens to hit that bad number, then this call to Headless.run will always fail, even though I've asked Headless to autopick a working display.
It seems to me that ensure_xvfb_launched is overly aggressive about terminating the call to :run. It would be nice for pick_available_display do something like
def pick_available_display(display_set, can_reuse)
@pending_exception = nil
display_set.each do |display_number|
@display = display_number
return true if xvfb_running? && can_reuse && (xvfb_mine? || !@autopick_display)
begin
return true if !xvfb_running? && launch_xvfb
rescue Headless::Exception => e
@pending_Exception = e
end
end
raise @pending_exception || Headless::Exception.new("Could not find an available display")
end
so that if other display options were available, the call would still succeed...
The text was updated successfully, but these errors were encountered:
Suppose I invoke
Headless.run(display: pick-a-display(), autopick: true) do ... end
, so that I specify both an initial guess for a display, and ask Headless to handle the rest. My server, for whatever the reason, currently has a particular display that consistently responds with "Cannot establish any listening sockets". (I don't know why; there are no Xvfb processes running at all. But that's beside the point right now...) So ifpick-a-display()
happens to hit that bad number, then this call toHeadless.run
will always fail, even though I've asked Headless to autopick a working display.It seems to me that
ensure_xvfb_launched
is overly aggressive about terminating the call to:run
. It would be nice forpick_available_display
do something likeso that if other display options were available, the call would still succeed...
The text was updated successfully, but these errors were encountered: