Skip Menu |

This queue is for tickets about the libnet CPAN distribution.

Report information
The Basics
Id: 78926
Status: resolved
Priority: 0/
Queue: libnet

People
Owner: Nobody in particular
Requestors: oleg [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.22
Fixed in: 1.25



Subject: Timeout should be set when creating data connection
Currently connection time inside sub _dataconn not limited. So, with broken/slow servers program may hang for long time. My propose is to inherit connect timeout value from command connection.
The timeout value is set in sub _dataconn() in the current version of libnet (1.24), around line 956: if ($data) { ${*$data} = ""; $data->timeout($ftp->timeout);
Чтв Янв 30 08:45:25 2014, SHAY писал: Show quoted text
> The timeout value is set in sub _dataconn() in the current version of > libnet (1.24), around line 956: > > if ($data) { > ${*$data} = ""; > $data->timeout($ftp->timeout);
I think this is not totally correct. On line 956 we sets timeout only after successfull connection. But connection time not limited in the current implementation. So we should set timeout when performing connection. I sent pull request on github to your fork of libnet some time ago: https://github.com/steve-m-hay/perl-libnet/pull/1
On Thu Jan 30 10:17:45 2014, OLEG wrote: Show quoted text
> Чтв Янв 30 08:45:25 2014, SHAY писал:
> > The timeout value is set in sub _dataconn() in the current version of > > libnet (1.24), around line 956: > > > > if ($data) { > > ${*$data} = ""; > > $data->timeout($ftp->timeout);
> > > I think this is not totally correct. On line 956 we sets timeout only > after successfull connection. But connection time not limited in the > current implementation. So we should set timeout when performing > connection. I sent pull request on github to your fork of libnet some > time ago: https://github.com/steve-m-hay/perl-libnet/pull/1
Ah, yes. Sorry, I see it now. I've merged your pull request in, so this patch will be in 1.25 soon. Many thanks!
Thanks again, now fixed in libnet-1.25.