--- loncom/loncnew 2003/08/03 00:44:31 1.17 +++ loncom/loncnew 2003/08/19 09:31:46 1.19 @@ -2,7 +2,7 @@ # The LearningOnline Network with CAPA # lonc maintains the connections to remote computers # -# $Id: loncnew,v 1.17 2003/08/03 00:44:31 foxr Exp $ +# $Id: loncnew,v 1.19 2003/08/19 09:31:46 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -45,6 +45,13 @@ # Change log: # $Log: loncnew,v $ +# Revision 1.19 2003/08/19 09:31:46 foxr +# Get socket directory from configuration rather than the old hard coded test +# way that I forgot to un-hard code. +# +# Revision 1.18 2003/08/06 09:52:29 foxr +# Also needed to remember to fail in-flight transactions if their sends fail. +# # Revision 1.17 2003/08/03 00:44:31 foxr # 1. Correct handling of connection failure: Assume it means the host is # unreachable and fail all of the queued transactions. Note that the @@ -143,7 +150,7 @@ my $IdleTimeout= 3600; # Wait an hour b # The variables below are only used by the child processes. # my $RemoteHost; # Name of host child is talking to. -my $UnixSocketDir= "/home/httpd/sockets"; +my $UnixSocketDir= $perlvar{'lonSockDir'} my $IdleConnections = Stack->new(); # Set of idle connections my %ActiveConnections; # Connections to the remote lond. my %ActiveTransactions; # LondTransactions in flight. @@ -928,6 +935,7 @@ sub LondWritable { # We'll treat this as if the socket got disconnected: Log("WARNING", "Connection to ".$RemoteHost. " has been disconnected"); + FailTransaction($ActiveTransactions{$Socket}); $Watcher->cancel(); KillSocket($Socket); return;