[LON-CAPA-cvs] cvs: loncom / loncnew
foxr
lon-capa-cvs@mail.lon-capa.org
Mon, 20 Sep 2004 09:34:31 -0000
foxr Mon Sep 20 05:34:31 2004 EDT
Modified files:
/loncom loncnew
Log:
Fix the issue where loncnew would rapidly oscillate connections. The problem
was that once it started trimmning connections. they'd all get trimmed out
at the rate of one/sec, rather than at the rate of one /idle timeout
period... needed to reset the idle timeout each time a connection got
trimmed.
Index: loncom/loncnew
diff -u loncom/loncnew:1.52 loncom/loncnew:1.53
--- loncom/loncnew:1.52 Mon Aug 30 07:01:04 2004
+++ loncom/loncnew Mon Sep 20 05:34:31 2004
@@ -2,7 +2,7 @@
# The LearningOnline Network with CAPA
# lonc maintains the connections to remote computers
#
-# $Id: loncnew,v 1.52 2004/08/30 11:01:04 foxr Exp $
+# $Id: loncnew,v 1.53 2004/09/20 09:34:31 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -310,6 +310,7 @@
if($IdleSeconds > $IdleTimeout) { # Prune a connection...
my $Socket = $IdleConnections->pop();
KillSocket($Socket);
+ IdleSeconds = 0; # Otherwise all connections get trimmed to fast.
}
} else {
$IdleSeconds = 0; # Reset idle count if not idle.