зеркало из https://github.com/mozilla/pjs.git
Place a 5 second timeout on the SMTP object -- this makes running setup bearable without an SMTP server (the default timeout is 2 minutes).
This commit is contained in:
Родитель
d7a697b91b
Коммит
dc40e1f631
|
@ -62,7 +62,7 @@ sub init {
|
|||
sub open {
|
||||
my $self = shift;
|
||||
{ local $^W = 0; # XXX shut up warnings in Net::SMTP
|
||||
$self->handle(Net::SMTP->new($self->host)); }
|
||||
$self->handle(Net::SMTP->new($self->host, 'Timeout' => 5)); } # XXX hard coded timeout
|
||||
if (not defined($self->handle)) {
|
||||
$self->warn(4, 'Could not create the SMTP handle');
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче