Subject: | Please add configurable timeout |
Please add configurable timeout support to Growl::GNTP (I've attached a patch).
Growl::GNTP uses IO::Socket's default timeout mechanism, which is whatever the underlying OS'
default is. That's usually too long, especially for applications like irssi, which blocks whenever its
plugins do.
Subject: | growl-gntp-add-timeout.patch |
--- lib/Growl/GNTP.pm.orig 2013-02-08 18:08:58.000000000 -0500
+++ lib/Growl/GNTP.pm 2013-02-08 18:14:30.000000000 -0500
@@ -15,6 +15,7 @@
$args{Proto} ||= 'tcp';
$args{PeerHost} ||= 'localhost';
$args{PeerPort} ||= 23053;
+ $args{Timeout} ||= 5;
$args{AppName} ||= 'Growl::GNTP';
$args{AppIcon} ||= '';
$args{Password} ||= '';
@@ -40,6 +41,7 @@
PeerAddr => $self->{PeerHost},
PeerPort => $self->{PeerPort},
Proto => $self->{Proto},
+ Timeout => $self->{Timeout},
);
die $@ unless $sock;
@@ -150,6 +152,7 @@
PeerAddr => $self->{PeerHost},
PeerPort => $self->{PeerPort},
Proto => $self->{Proto},
+ Timeout => $self->{Timeout},
);
die $@ unless $sock;
@@ -227,6 +230,7 @@
PeerAddr => $self->{PeerHost},
PeerPort => $self->{PeerPort},
Proto => $self->{Proto},
+ Timeout => $self->{Timeout},
);
die $@ unless $sock;
@@ -261,6 +265,7 @@
LocalPort => $data{Port},
Proto => 'tcp',
Listen => 10,
+ Timeout => $self->{Timeout},
);
die $@ unless $sock;
@@ -498,6 +503,7 @@
PeerHost # 'localhost'
PeerPort # 23053
+ Timeout # 5
AppName # 'Growl::GNTP'
AppIcon # ''
Password # ''