[LON-CAPA-cvs] cvs: loncom / loncnew

foxr lon-capa-cvs@mail.lon-capa.org
Fri, 12 Dec 2003 09:57:28 -0000


foxr		Fri Dec 12 04:57:28 2003 EDT

  Modified files:              
    /loncom	loncnew 
  Log:
  Simplify the connection timeout logic... iterate over all active connections
  that are not idle.
  
  
  
Index: loncom/loncnew
diff -u loncom/loncnew:1.34 loncom/loncnew:1.35
--- loncom/loncnew:1.34	Thu Dec 11 18:18:37 2003
+++ loncom/loncnew	Fri Dec 12 04:57:28 2003
@@ -2,7 +2,7 @@
 # The LearningOnline Network with CAPA
 # lonc maintains the connections to remote computers
 #
-# $Id: loncnew,v 1.34 2003/12/11 23:18:37 albertel Exp $
+# $Id: loncnew,v 1.35 2003/12/12 09:57:28 foxr Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -210,7 +210,6 @@
 	return $peerfile;
     }
 }
-#----------------------------- Timer management ------------------------
 =pod
 
 =head2 Debug
@@ -267,6 +266,7 @@
                                 # a connection failure:
     $ConnectionRetriesLeft--;
 }
+#----------------------------- Timer management ------------------------
 
 =pod
 
@@ -301,14 +301,10 @@
     #
     #  For each inflight transaction, tick down its timeout counter.
     #
-    foreach my $item (keys %ActiveTransactions) {
-	my $Socket = $ActiveTransactions{$item}->getServer();
-	$Socket->Tick();
-    }
+
     foreach my $item (keys %ActiveConnections) {
 	my $State = $ActiveConnections{$item}->data->GetState();
-	if ($State ne 'Idle' && $State ne 'SendingRequest' &&
-	    $State ne 'ReceivingReply') {
+	if ($State ne 'Idle') {
 	    Debug(5,"Ticking Socket $State $item");
 	    $ActiveConnections{$item}->data->Tick();
 	}