version 1.17, 2003/08/03 00:44:31
|
version 1.19, 2003/08/19 09:31:46
|
Line 45
|
Line 45
|
|
|
# Change log: |
# Change log: |
# $Log$ |
# $Log$ |
|
# 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 |
# Revision 1.17 2003/08/03 00:44:31 foxr |
# 1. Correct handling of connection failure: Assume it means the host is |
# 1. Correct handling of connection failure: Assume it means the host is |
# unreachable and fail all of the queued transactions. Note that the |
# unreachable and fail all of the queued transactions. Note that the |
Line 143 my $IdleTimeout= 3600; # Wait an hour b
|
Line 150 my $IdleTimeout= 3600; # Wait an hour b
|
# The variables below are only used by the child processes. |
# The variables below are only used by the child processes. |
# |
# |
my $RemoteHost; # Name of host child is talking to. |
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 $IdleConnections = Stack->new(); # Set of idle connections |
my %ActiveConnections; # Connections to the remote lond. |
my %ActiveConnections; # Connections to the remote lond. |
my %ActiveTransactions; # LondTransactions in flight. |
my %ActiveTransactions; # LondTransactions in flight. |
Line 928 sub LondWritable {
|
Line 935 sub LondWritable {
|
# We'll treat this as if the socket got disconnected: |
# We'll treat this as if the socket got disconnected: |
Log("WARNING", "Connection to ".$RemoteHost. |
Log("WARNING", "Connection to ".$RemoteHost. |
" has been disconnected"); |
" has been disconnected"); |
|
FailTransaction($ActiveTransactions{$Socket}); |
$Watcher->cancel(); |
$Watcher->cancel(); |
KillSocket($Socket); |
KillSocket($Socket); |
return; |
return; |