From: erickson Date: Tue, 22 Nov 2005 19:50:49 +0000 (+0000) Subject: if client has been bootstrapped and is currently connected, bootstrap_client X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=21d702332c4abed7630d6add51120dde28c3b5f5;p=working%2FOpenSRF.git if client has been bootstrapped and is currently connected, bootstrap_client will not re-connect (since all it will do is over-write the exact same connection) git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@581 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/perlmods/OpenSRF/System.pm b/src/perlmods/OpenSRF/System.pm index 85f6e28..a93a129 100644 --- a/src/perlmods/OpenSRF/System.pm +++ b/src/perlmods/OpenSRF/System.pm @@ -236,6 +236,13 @@ sub bootstrap { sub bootstrap_client { my $self = shift; + my $con = OpenSRF::Transport::PeerHandle->retrieve; + if($con and $con->tcp_connected) { + warn "PeerHandle is already connected in 'bootstrap_client'... returning\n"; + _log( "PeerHandle is already connected in 'bootstrap_client'... returning"); + return; + } + my %params = @_; $bootstrap_config_file =