Subject: | Timeout option doesn't work |
Date: | Fri, 7 Apr 2017 12:44:34 +0200 |
To: | bug-Net-SMTPS [...] rt.cpan.org |
From: | Emanuele Tomasi <emanuele.tomasi [...] staff.aruba.it> |
Hi,
I think that the Timeout option doesn't work.
We can test with this code an Net::SMTP:
---
use Net::SMTP;
my $smtp = Net::SMTP->new(
Host => 'localhost',
Port => 8025,
Timeout => 10,
Debug => 1,
) or die("Error $@");
---
(I have a 'nc -l 8025' server on localhost)
the output is (correctly):
---
Net::SMTP>>> Net::SMTP(3.07)
Net::SMTP>>> Net::Cmd(3.07)
Net::SMTP>>> Exporter(5.70)
Net::SMTP>>> IO::Socket::IP(0.37)
Net::SMTP>>> IO::Socket(1.34)
Net::SMTP>>> IO::Handle(1.33)
Net::SMTP: Net::Cmd::getline(): timeout at test.pl line 3.
Error Net::SMTP: 421 [Net::SMTP] Timeout at test.pl line 3.
---
But if I use Net::SMTPS with the same options, the script wait
indefinitely on:
---
Net::SMTPS>>> Net::SMTPS(0.05)
Net::SMTPS>>> IO::Socket::INET(1.33)
Net::SMTPS>>> IO::Socket(1.34)
Net::SMTPS>>> IO::Handle(1.33)
Net::SMTPS>>> Exporter(5.70)
Net::SMTPS>>> Net::SMTP(3.07)
Net::SMTPS>>> Net::Cmd(3.07)
Net::SMTPS>>> IO::Socket::IP(0.37)
---
Best regards,
Emanuele
--
Emanuele Tomasi
eSecurity - http://www.aruba.it
Centralino: 0575 0505
Interno: 9872
= = = = = = = = = = = = = = = =
Questo messaggio e i suoi allegati sono indirizzati esclusivamente ai destinatari.
Qualsiasi suo utilizzo, comunicazione o diffusione non autorizzata sono rigorosamente vietate.
Qualora il presente messaggio Le fosse pervenuto per errore, Le saremmo grati se ne distruggesse ogni copia e comunicasse al mittente l'errata ricezione.
= = = = = = = = = = = = = = = =