Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

telnet timeouts not returning correctly #4

Closed
dschwartz33 opened this issue Feb 15, 2017 · 2 comments
Closed

telnet timeouts not returning correctly #4

dschwartz33 opened this issue Feb 15, 2017 · 2 comments

Comments

@dschwartz33
Copy link

First, my apologies if this is addressed in a newer version - we have
IO::Socket:Socks v. 0.67
IO::Socket::Socks::Wrapper v. 0.14

The wrapper is applied globally before any other connection related libs are included:

require IO::Socket::Socks::Wrapper;
IO::Socket::Socks::Wrapper->import({ProxyAddr => $Socks5Host,
	ProxyPort => $Socks5Port,
	Timeout => 30,
	SocksDebug => 0});

The file where this happens calls a second file that loops over connecting to a number of devices with the following code:
use Net::Telnet;

	my $telnet = new Net::Telnet(
		Timeout => 2,
		Cmd_remove_mode => 1,
		Errmode => 'return',
		Dump_Log => $DebugLog,
		Prompt => '/-->\s*$/i'
	);
	my $error;
	# Ok, open the connection
	if(!$telnet->open($self->{'ip'})) {
		$error="Could not connect to ONT ($self->{'ip'}) - " . $telnet->errmsg();
		return (0,$error);
	}

If any of these devices happen to not be online, and open() times out, it does not return $error, but instead exits back to the first file.

@olegwtf
Copy link
Owner

olegwtf commented Feb 16, 2017

This should be fixed by d75f159

Please check with version from this repository

@dschwartz33
Copy link
Author

Yep, that fixes it - thanks!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants