--- loncom/LondConnection.pm 2003/11/04 11:22:48 1.17 +++ loncom/LondConnection.pm 2003/12/11 23:16:06 1.20 @@ -1,7 +1,7 @@ # This module defines and implements a class that represents # a connection to a lond daemon. # -# $Id: LondConnection.pm,v 1.17 2003/11/04 11:22:48 foxr Exp $ +# $Id: LondConnection.pm,v 1.20 2003/12/11 23:16:06 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -129,7 +129,7 @@ sub Dump { my $value; print "Dumping LondConnectionObject:\n"; while(($key, $value) = each %$self) { - print STDERR "$key -> $value\n"; + print "$key -> $value\n"; } print "-------------------------------\n"; } @@ -562,7 +562,15 @@ Shuts down the socket. sub Shutdown { my $self = shift; my $socket = $self->GetSocket(); - $socket->shutdown(2); + Debug(5,"socket is -$socket-"); + if ($socket) { + # Ask lond to exit too. Non blocking so + # there is no cost for failure. + eval { + $socket->send("exit\n", 0); + $socket->shutdown(2); + } + } } =pod