making sure cstore connection did not time out when using global editor object
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 19 Sep 2006 14:15:14 +0000 (14:15 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 19 Sep 2006 14:15:14 +0000 (14:15 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@6137 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/SIP.pm

index 4cea63e..9b88a80 100644 (file)
@@ -74,9 +74,12 @@ sub to_bool {
 }
 
 sub editor {
-       $editor = make_editor() unless $editor;
-       return $editor;
+       return $editor 
+               if $editor and $editor->{session}
+               and $editor->session->connected;
+       return $editor = make_editor();
 }
+
 sub reset_editor {
        $editor = undef;
        return editor();