if client has been bootstrapped and is currently connected, bootstrap_client
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 22 Nov 2005 19:50:49 +0000 (19:50 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
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/ILS/trunk@2118 dcc99617-32d9-48b4-a31d-7c20da2025e4

OpenSRF/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 =