version 1.54, 2003/08/29 18:25:01
|
version 1.56, 2003/10/24 16:36:14
|
Line 361 while (1) {
|
Line 361 while (1) {
|
# accept a new connection |
# accept a new connection |
&status("Accept new connection: $conserver"); |
&status("Accept new connection: $conserver"); |
$client = $server->accept(); |
$client = $server->accept(); |
if($DEBUG) { |
if (!$client) { |
&logthis("New client fd = ".$client->fileno."\n"); |
&logthis("Got stupid nonexisent client on ".$server->fileno." $conserver \n"); |
|
} else { |
|
if($DEBUG) { |
|
&logthis("New client fd = ".$client->fileno."\n"); |
|
} |
|
$servers{$client->fileno} = $client; |
|
nonblock($client); |
|
$client->sockopt(SO_KEEPALIVE, 1); # Enable monitoring of |
|
# connection liveness. |
} |
} |
$servers{$client->fileno} = $client; |
|
nonblock($client); |
|
$client->sockopt(SO_KEEPALIVE, 1);# Enable monitoring of |
|
# connection liveness. |
|
} |
} |
HandleInput($infdset, \%servers, \%inbuffer, \%outbuffer, \%ready); |
HandleInput($infdset, \%servers, \%inbuffer, \%outbuffer, \%ready); |
HandleOutput($outfdset, \%servers, \%outbuffer, \%inbuffer, |
HandleOutput($outfdset, \%servers, \%outbuffer, \%inbuffer, |
Line 707 sub openremote {
|
Line 711 sub openremote {
|
my $st=120+int(rand(240)); # Sleep before opening: |
my $st=120+int(rand(240)); # Sleep before opening: |
|
|
unless ( |
unless ( |
$remotesock = IO::Socket::INET->new(PeerAddr => $hostip{$conserver}, |
$remotesock = IO::Socket::INET->new(PeerAddr => $hostname{$conserver}, |
PeerPort => $perlvar{'londPort'}, |
PeerPort => $perlvar{'londPort'}, |
Proto => "tcp", |
Proto => "tcp", |
Type => SOCK_STREAM) |
Type => SOCK_STREAM) |
Line 988 sub londtransaction {
|
Line 992 sub londtransaction {
|
alarm(0); |
alarm(0); |
}; |
}; |
} else { |
} else { |
&logthis("lonc - suiciding on send Timeout"); |
&logthis("lonc - $conserver - suiciding on send Timeout"); |
die("lonc - suiciding on send Timeout"); |
die("lonc - $conserver - suiciding on send Timeout"); |
} |
} |
if ($@ =~ /timeout/) { |
if ($@ =~ /timeout/) { |
&logthis("lonc - suiciding on read Timeout"); |
&logthis("lonc - $conserver - suiciding on read Timeout"); |
die("lonc - suiciding on read Timeout"); |
die("lonc - $conserver - suiciding on read Timeout"); |
} |
} |
# |
# |
# Restore the initial sigmask set. |
# Restore the initial sigmask set. |