Subject: | Death after socket read failure |
Encountered the following:
Wed Apr 6 12:01:00 2005 debug, Connected to 192.168.196.200, port 2345
Wed Apr 6 12:01:00 2005 debug, Sending login message: MS::IO::Server, 2.0, ,
Wed Apr 6 12:01:00 2005 debug, Waiting for server's response ...
Wed Apr 6 12:01:00 2005 debug, Logged in, server replies: Welcome!
Error while reading socket: A connection with a remote socket was reset by that
socket. at /usr/local/5.8.1/lib/perl5/site_perl/5.8.1/RPC/PlServer/Comm.pm line
110.
Found in the code no means to trap and recover. The PlServer.pm and Comm.pm code both 'die' upon failure rather then returning an error state to allow for recovery:
Comm.pm:
if (!$result) {
return undef if defined($result);
die "Error while reading socket: $!";
}
PlServer.pm:
my $msg = $self->RPC::PlServer::Comm::Read();
die "Unexpected EOF from client" unless defined $msg;
die "Login message: Expected array, got $msg" unless ref($msg) eq 'ARRAY';
The result is that if a call is made and encouters the failure, the calling application has no means of recovering and trying again. Instead, what was attempted is simply lost.