Subject: | Missing timeout check in Net::CLI::Interact::Role::Prompt - patch attached |
Date: | Sun, 20 Jul 2014 22:03:23 +0200 |
To: | bug-Net-CLI-Interact [...] rt.cpan.org |
From: | Jørgen Elgaard Larsen <jel [...] solfisk.dk> |
There is no check for timeout in the while(1) loop in find_prompt. This
makes it wait forever, even if you have set a timeout.
I discovered it while using Net::Appliance::Session to connect via SSH:
For a certain host, my script simply hang forever.
I turned out that the SSH host disconnected, thus making the SSH client
output "Connection closed by XXXX" instead of the expected login prompt.
Of course, Net::Appliance::Session should look for that prompt, too -
but in any case, Net::CLI::Interact::Role::Prompt should respect timeouts.
I have attached a patch that fixes the problem.
Kind regards,
Jørgen Elgaard Larsen
Message body is not shown because sender requested not to inline it.