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
{{ message }}
Repository navigation
Getting error `waitfor': timed out while waiting for more data (Net::ReadTimeout) #2
I got this error 'waitfor' timed out while waiting for more data again and again
why I am getting this error again and again, what's wrong in the code snipet?
I have a similar issue, but neither "Prompt" or "Match" work. This is because the Telnet server don't send any prompt. And the waitfor in the cmd function send only a Prompt in 0.2.0 version. I made a test in rewriting the cmd function that's give me satisfaction. Is my solution correct ? Could a correction be donne in next version ?
def cmd(options) # :yield: recvdata
match = @options["Prompt"]
time_out = @options["Timeout"]
fail_eof = @options["FailEOF"]
typeMatch = "Prompt"
if options.kind_of?(Hash)
cmd = options["Cmd"] if options.has_key?("String")
if options.has_key?("String")
match = options["String"]
typeMatch="String"
end
if options.has_key?("Match")
match = options["Match"]
typeMatch="Match"
end
time_out = options["Timeout"] if options.has_key?("Timeout")
fail_eof = options["FailEOF"] if options.has_key?("FailEOF")
else
cmd = options
end
self.puts(cmd)
if block_given?
waitfor({typeMatch => match, "Timeout" => time_out, "FailEOF" => fail_eof}){|c| yield c }
else
waitfor({typeMatch => match, "Timeout" => time_out, "FailEOF" => fail_eof})
end
end
Activity
Alexey1100 commentedon Mar 6, 2017
You didn't define neither prompt nor match pattern for your
cmd.Take a look at the example in README.
pommechocolat commentedon Jan 23, 2023
I have a similar issue, but neither "Prompt" or "Match" work. This is because the Telnet server don't send any prompt. And the waitfor in the cmd function send only a Prompt in 0.2.0 version. I made a test in rewriting the cmd function that's give me satisfaction. Is my solution correct ? Could a correction be donne in next version ?