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:
Sean Kirby 2010-10-29 18:30:06 -04:00
parent b89a60d897
commit a9a0845b19
1 changed files with 11 additions and 8 deletions

View File

@ -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