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
|
# IO.gets
|
||||||
# => Hydra::Message # or subclass
|
# => Hydra::Message # or subclass
|
||||||
def gets
|
def gets
|
||||||
raise IOError unless @reader
|
while true
|
||||||
message = @reader.gets
|
begin
|
||||||
return nil unless message
|
raise IOError unless @reader
|
||||||
return Message.build(eval(message.chomp))
|
message = @reader.gets
|
||||||
rescue SyntaxError, NameError
|
return nil unless message
|
||||||
# uncomment to help catch remote errors by seeing all traffic
|
return Message.build(eval(message.chomp))
|
||||||
#$stderr.write "Not a message: [#{message.inspect}]\n"
|
rescue SyntaxError, NameError
|
||||||
return gets
|
# uncomment to help catch remote errors by seeing all traffic
|
||||||
|
#$stderr.write "Not a message: [#{message.inspect}]\n"
|
||||||
|
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