From 21d702332c4abed7630d6add51120dde28c3b5f5 Mon Sep 17 00:00:00 2001 From: erickson Date: Tue, 22 Nov 2005 19:50:49 +0000 Subject: [PATCH] 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 --- src/perlmods/OpenSRF/System.pm | 7 +++++++ 1 file changed, 7 insertions(+) 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 = -- 2.11.0