Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 605626 | Differences between
and this patch

Collapse All | Expand All

(-)a/scripts/ipserv.pl.in (-1 / +7 lines)
Lines 20-25 Link Here
20
20
21
use strict;
21
use strict;
22
use IO::Socket;
22
use IO::Socket;
23
use IO::Socket::Timeout qw(IO::Socket::INET);
23
24
24
my $ipv4_rex = qr/(?:\d{1,3}\.){3}\d{1,3}/imosx;
25
my $ipv4_rex = qr/(?:\d{1,3}\.){3}\d{1,3}/imosx;
25
26
Lines 128-134 Link Here
128
	$socket = IO::Socket::INET->new(PeerAddr => $target->{url},
129
	$socket = IO::Socket::INET->new(PeerAddr => $target->{url},
129
					PeerPort => $target->{port},
130
					PeerPort => $target->{port},
130
					Proto    => "tcp",
131
					Proto    => "tcp",
131
					Type     => SOCK_STREAM)
132
					Type     => SOCK_STREAM,
133
					Timeout  => 2 * 60)
132
	    or $retries--;
134
	    or $retries--;
133
135
134
    } while(!defined($socket) && $retries != 0);
136
    } while(!defined($socket) && $retries != 0);
Lines 137-142 Link Here
137
	die "could not connect to $target->{url}: $!";
139
	die "could not connect to $target->{url}: $!";
138
    }
140
    }
139
141
142
    IO::Socket::Timeout->enable_timeouts_on($socket);
143
    $socket->read_timeout(2 * 60);
144
    $socket->write_timeout(2 * 60);
145
140
    if(defined($target->{request})) {
146
    if(defined($target->{request})) {
141
	print($socket $target->{request});
147
	print($socket $target->{request});
142
    }
148
    }

Return to bug 605626