[LON-CAPA-cvs] cvs: loncom / lonc
albertel
lon-capa-cvs@mail.lon-capa.org
Wed, 17 Sep 2003 19:05:03 -0000
albertel Wed Sep 17 15:05:03 2003 EDT
Modified files:
/loncom lonc
Log:
- better error messages when dyng
- perl 5.8 seems create noexistant clients, if the client isnt there just go about our buisness
Index: loncom/lonc
diff -u loncom/lonc:1.54 loncom/lonc:1.55
--- loncom/lonc:1.54 Fri Aug 29 14:25:01 2003
+++ loncom/lonc Wed Sep 17 15:05:03 2003
@@ -5,7 +5,7 @@
# provides persistent TCP connections to the other servers in the network
# through multiplexed domain sockets
#
-# $Id: lonc,v 1.54 2003/08/29 18:25:01 albertel Exp $
+# $Id: lonc,v 1.55 2003/09/17 19:05:03 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -361,13 +361,17 @@
# accept a new connection
&status("Accept new connection: $conserver");
$client = $server->accept();
- if($DEBUG) {
- &logthis("New client fd = ".$client->fileno."\n");
+ if (!$client) {
+ &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);
HandleOutput($outfdset, \%servers, \%outbuffer, \%inbuffer,
@@ -988,12 +992,12 @@
alarm(0);
};
} else {
- &logthis("lonc - suiciding on send Timeout");
- die("lonc - suiciding on send Timeout");
+ &logthis("lonc - $conserver - suiciding on send Timeout");
+ die("lonc - $conserver - suiciding on send Timeout");
}
if ($@ =~ /timeout/) {
- &logthis("lonc - suiciding on read Timeout");
- die("lonc - suiciding on read Timeout");
+ &logthis("lonc - $conserver - suiciding on read Timeout");
+ die("lonc - $conserver - suiciding on read Timeout");
}
#
# Restore the initial sigmask set.