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

foxr foxr@source.lon-capa.org
Mon, 20 Dec 2010 11:15:51 -0000


foxr		Mon Dec 20 11:15:51 2010 EDT

  Modified files:              
    /loncom	loncnew 
  Log:
  - Cancel watcher on fd when killing off a socket...just in case we'll
    get 'readable' events on fds that are dead.
  - When killing a socket update the ps axuww status that is displayed for the
    loncnew process.
  
  
  
Index: loncom/loncnew
diff -u loncom/loncnew:1.89 loncom/loncnew:1.90
--- loncom/loncnew:1.89	Mon Jun 14 13:29:27 2010
+++ loncom/loncnew	Mon Dec 20 11:15:51 2010
@@ -2,7 +2,7 @@
 # The LearningOnline Network with CAPA
 # lonc maintains the connections to remote computers
 #
-# $Id: loncnew,v 1.89 2010/06/14 13:29:27 www Exp $
+# $Id: loncnew,v 1.90 2010/12/20 11:15:51 foxr Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -761,6 +761,7 @@
 	delete ($ActiveTransactions{$Socket});
     }
     if(exists($ActiveConnections{$Socket})) {
+	$ActiveConnections{$Socket}->cancel;
 	delete($ActiveConnections{$Socket});
 	$ConnectionCount--;
 	if ($ConnectionCount < 0) { $ConnectionCount = 0; }
@@ -772,6 +773,7 @@
 	EmptyQueue();
 	CloseAllLondConnections; # Should all already be closed but...
     }
+    UpdateStatus();
 }
 
 =pod
@@ -1206,7 +1208,7 @@
 					 &GetServerPort(),
 					 &GetHostId());
 
-    if($Connection eq undef) {	# Needs to be more robust later.
+    if($Connection eq undef) {	
 	Log("CRITICAL","Failed to make a connection with lond.");
 	$ConnectionRetriesLeft--;
 	return 0;		# Failure.