X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=scpubgit%2FObject-Remote.git;a=blobdiff_plain;f=lib%2FObject%2FRemote%2FHandle.pm;h=e68aae9c119fa83ae63f1088a12e006045d92353;hp=7e9c21870d976037e7fbe02799ea344dc1851d9c;hb=82ef4e4bbc6e05ab1f8fe2a71374907f16fb947a;hpb=867e4de52669f99e6478ab39afd9be27f27e04dd diff --git a/lib/Object/Remote/Handle.pm b/lib/Object/Remote/Handle.pm index 7e9c218..e68aae9 100644 --- a/lib/Object/Remote/Handle.pm +++ b/lib/Object/Remote/Handle.pm @@ -86,7 +86,11 @@ sub DEMOLISH { my ($self, $gd) = @_; Dlog_trace { "Demolishing remote handle $_" } $self->id; return if $gd or $self->disarmed_free; - $self->connection->send_free($self->id); + #this could happen after the connection has gone away + eval { $self->connection->send_free($self->id) }; + if ($@ && $@ !~ m/^Attempt to invoke _send on a connection that is not valid/) { + die "Could not invoke send_free on connection for handle " . $self->id; + } } 1;