From: Dirk Koopman Date: Fri, 23 Dec 2011 13:06:31 +0000 (+0000) Subject: fix error message on disconnect from peer X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=370d3563d7df44b754549330fb640051f7c31889;p=spider.git fix error message on disconnect from peer --- diff --git a/perl/Msg.pm b/perl/Msg.pm index 60906c59..3fa0e676 100644 --- a/perl/Msg.pm +++ b/perl/Msg.pm @@ -234,9 +234,14 @@ sub disconnect } } - if (defined($sock)) { + if (ref $sock && $sock->isa('AnyEvent::Handle') && exists $sock->{fh}) { shutdown($sock->{fh}, 2); $sock->destroy; + } else { + my $s; + $s = "already destroyed" unless exists $sock->{fh}; + $s ||= ref $sock || $sock || "undefined"; + dbg("Msg::disconnect trying to disconnect a $s socket") if isdbg('chan'); } unless ($main::is_win) { diff --git a/perl/Version.pm b/perl/Version.pm index 99b2e673..3c7bad08 100644 --- a/perl/Version.pm +++ b/perl/Version.pm @@ -11,7 +11,7 @@ use vars qw($version $subversion $build $gitversion); $version = '1.56'; $subversion = '0'; -$build = '8'; -$gitversion = '0702d38'; +$build = '9'; +$gitversion = 'a22dbff'; 1;