fixed stack overflows that could happen when a large number of runners run tests that output a lot to the console when ssh testing
This commit is contained in:
parent
b89a60d897
commit
a9a0845b19
|
@ -8,6 +8,8 @@ module Hydra #:nodoc:
|
||||||
# IO.gets
|
# IO.gets
|
||||||
# => Hydra::Message # or subclass
|
# => Hydra::Message # or subclass
|
||||||
def gets
|
def gets
|
||||||
|
while true
|
||||||
|
begin
|
||||||
raise IOError unless @reader
|
raise IOError unless @reader
|
||||||
message = @reader.gets
|
message = @reader.gets
|
||||||
return nil unless message
|
return nil unless message
|
||||||
|
@ -15,7 +17,8 @@ module Hydra #:nodoc:
|
||||||
rescue SyntaxError, NameError
|
rescue SyntaxError, NameError
|
||||||
# uncomment to help catch remote errors by seeing all traffic
|
# uncomment to help catch remote errors by seeing all traffic
|
||||||
#$stderr.write "Not a message: [#{message.inspect}]\n"
|
#$stderr.write "Not a message: [#{message.inspect}]\n"
|
||||||
return gets
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Write a Message to the output IO object. It will automatically
|
# Write a Message to the output IO object. It will automatically
|
||||||
|
|
Loading…
Reference in New Issue