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,14 +8,17 @@ module Hydra #:nodoc:
|
|||
# IO.gets
|
||||
# => Hydra::Message # or subclass
|
||||
def gets
|
||||
raise IOError unless @reader
|
||||
message = @reader.gets
|
||||
return nil unless message
|
||||
return Message.build(eval(message.chomp))
|
||||
rescue SyntaxError, NameError
|
||||
# uncomment to help catch remote errors by seeing all traffic
|
||||
#$stderr.write "Not a message: [#{message.inspect}]\n"
|
||||
return gets
|
||||
while true
|
||||
begin
|
||||
raise IOError unless @reader
|
||||
message = @reader.gets
|
||||
return nil unless message
|
||||
return Message.build(eval(message.chomp))
|
||||
rescue SyntaxError, NameError
|
||||
# uncomment to help catch remote errors by seeing all traffic
|
||||
#$stderr.write "Not a message: [#{message.inspect}]\n"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Write a Message to the output IO object. It will automatically
|
||||
|
|
Loading…
Reference in New Issue