Skip Menu |

This queue is for tickets about the Net-CLI-Interact CPAN distribution.

Report information
The Basics
Id: 97367
Status: resolved
Priority: 0/
Queue: Net-CLI-Interact

People
Owner: Nobody in particular
Requestors: jel [...] solfisk.dk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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.

Many thanks for the patch. Now applied and version 2.142010 pushed to CPAN. regards, oliver.