--- loncom/LondConnection.pm 2004/02/09 13:33:16 1.25 +++ loncom/LondConnection.pm 2004/02/27 18:32:21 1.26 @@ -1,7 +1,7 @@ # This module defines and implements a class that represents # a connection to a lond daemon. # -# $Id: LondConnection.pm,v 1.25 2004/02/09 13:33:16 albertel Exp $ +# $Id: LondConnection.pm,v 1.26 2004/02/27 18:32:21 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -414,7 +414,12 @@ Returns 0 if successful, or -1 if not. sub Writable { my $self = shift; # Get reference to the object. my $socket = $self->{Socket}; - my $nwritten = $socket->send($self->{TransactionRequest}, 0); + my $nwritten; + if ($socket) { + eval { + $nwritten = $socket->send($self->{TransactionRequest}, 0); + } + } my $errno = $! + 0; unless (defined $nwritten) { if($errno != POSIX::EINTR) {