From: erickson Date: Tue, 19 Sep 2006 14:15:14 +0000 (+0000) Subject: making sure cstore connection did not time out when using global editor object X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=bfccdf2f6fcfbb33a85dfb73fda901a181242e9f;p=evergreen%2Fpines.git making sure cstore connection did not time out when using global editor object git-svn-id: svn://svn.open-ils.org/ILS/trunk@6137 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/SIP.pm b/Open-ILS/src/perlmods/OpenILS/SIP.pm index 4cea63e96b..9b88a805cb 100644 --- a/Open-ILS/src/perlmods/OpenILS/SIP.pm +++ b/Open-ILS/src/perlmods/OpenILS/SIP.pm @@ -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();