Ignore exceptions in SearchClient dtor Fixes LUCY-286.
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/8aafcd96 Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/8aafcd96 Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/8aafcd96 Branch: refs/heads/0.6 Commit: 8aafcd961c7d1c5338de424907b769f4453500e6 Parents: 22b11ac Author: Nick Wellnhofer <wellnho...@aevum.de> Authored: Wed Nov 30 20:19:36 2016 +0100 Committer: Nick Wellnhofer <wellnho...@aevum.de> Committed: Fri Dec 2 20:13:43 2016 +0100 ---------------------------------------------------------------------- perl/lib/LucyX/Remote/SearchClient.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy/blob/8aafcd96/perl/lib/LucyX/Remote/SearchClient.pm ---------------------------------------------------------------------- diff --git a/perl/lib/LucyX/Remote/SearchClient.pm b/perl/lib/LucyX/Remote/SearchClient.pm index cfcbb73..abde423 100644 --- a/perl/lib/LucyX/Remote/SearchClient.pm +++ b/perl/lib/LucyX/Remote/SearchClient.pm @@ -51,7 +51,12 @@ sub new { sub DESTROY { my $self = shift; - $self->close if defined $sock{$$self}; + if ( defined $sock{$$self} ) { + # Ignore exceptions in destructor. + eval { + $self->close; + }; + } delete $peer_address{$$self}; delete $sock{$$self}; $self->SUPER::DESTROY;