if client has been bootstrapped and is currently connected, bootstrap_client
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 22 Nov 2005 19:50:49 +0000 (19:50 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 22 Nov 2005 19:50:49 +0000 (19:50 +0000)
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

index 85f6e28..a93a129 100644 (file)
@@ -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 =