From: Tyler Riddle Date: Wed, 7 Nov 2012 03:48:01 +0000 (-0800) Subject: make weak reference to router connection optional X-Git-Tag: v0.003001_01~84 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=49dbc3845d98d4e11314b02b75f9fb651aa7b028;p=scpubgit%2FObject-Remote.git make weak reference to router connection optional --- diff --git a/lib/Object/Remote/Logging/Router.pm b/lib/Object/Remote/Logging/Router.pm index ee40377..838da82 100644 --- a/lib/Object/Remote/Logging/Router.pm +++ b/lib/Object/Remote/Logging/Router.pm @@ -74,7 +74,7 @@ sub handle_log_request { } sub connect { - my ($self, $destination) = @_; + my ($self, $destination, $is_weak) = @_; my $wrapped; if (ref($destination) ne 'CODE') { @@ -84,7 +84,7 @@ sub connect { } push(@{$self->_connections}, $wrapped); - weaken($self->_connections->[-1]); + weaken($self->_connections->[-1]) if $is_weak; } sub _clean_connections {