avoid sending unnecessary disconnects to cstore
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 14 Jun 2010 13:06:50 +0000 (13:06 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 14 Jun 2010 13:06:50 +0000 (13:06 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16697 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm

index 66345b0..89ccfa6 100644 (file)
@@ -295,7 +295,9 @@ sub rollback {
 
 sub disconnect {
        my $self = shift;
-       $self->session->disconnect if $self->{session};
+       $self->session->disconnect if 
+        $self->{session} and 
+        $self->{session}->state == OpenSRF::AppSession::CONNECTED();
     delete $self->{session};
 }