summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fml/lib/Mail/Delivery/Net/INET4.pm14
1 files changed, 8 insertions, 6 deletions
diff --git a/fml/lib/Mail/Delivery/Net/INET4.pm b/fml/lib/Mail/Delivery/Net/INET4.pm
index 4542f299..fb46b91a 100644
--- a/fml/lib/Mail/Delivery/Net/INET4.pm
+++ b/fml/lib/Mail/Delivery/Net/INET4.pm
@@ -1,10 +1,10 @@
#-*- perl -*-
#
-# Copyright (C) 2001,2002,2004 Ken'ichi Fukamachi
+# Copyright (C) 2001,2002,2004,2005 Ken'ichi Fukamachi
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: INET4.pm,v 1.9 2004/01/24 09:03:58 fukachan Exp $
+# $FML: INET4.pm,v 1.10 2004/06/29 10:05:29 fukachan Exp $
#
package Mail::Delivery::Net::INET4;
@@ -28,12 +28,14 @@ sub connect4
my $mta = $args->{ _mta };
my $socket = undef;
- # avoid croak() in IO::Socket module;
- # XXX-TODO: how long is timeout ??? (where we specified ?)
+ # XXX we should avoid croak() in IO::Socket module;
+ # XXX-TODO: timeout must be customizable.
eval {
local($SIG{ALRM}) = sub { Log("Error: timeout to connect $mta");};
use IO::Socket;
- $socket = new IO::Socket::INET($mta);
+ $socket = new IO::Socket::INET(PeerAddr => $mta,
+ Timeout => 120,
+ );
};
if ($@) {
Log("Error: cannot create socket for $mta");
@@ -103,7 +105,7 @@ Ken'ichi Fukamachi
=head1 COPYRIGHT
-Copyright (C) 2001,2002,2004 Ken'ichi Fukamachi
+Copyright (C) 2001,2002,2004,2005 Ken'ichi Fukamachi
All rights reserved. This program is free software; you can
redistribute it and/or modify it under the same terms as Perl itself.