From: Michael M Slusarz Date: Tue, 7 Sep 2010 08:26:38 +0000 (-0600) Subject: Ticket #7422: Test out session close/reopen for potentially long operations X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=9de9ed837ec6181bb1de011156f7c6cef44c58f5;p=horde.git Ticket #7422: Test out session close/reopen for potentially long operations --- diff --git a/imp/lib/Ajax/Application.php b/imp/lib/Ajax/Application.php index b72b92a7d..9fbed6763 100644 --- a/imp/lib/Ajax/Application.php +++ b/imp/lib/Ajax/Application.php @@ -1930,6 +1930,10 @@ class IMP_Ajax_Application extends Horde_Core_Ajax_Application */ protected function _viewPortData($change) { + // Ticket #7422: Listing messages may be a long-running operation, + // so close the session while we are doing it to prevent deadlocks. + session_write_close(); + $args = array( 'applyfilter' => $this->_vars->applyfilter, 'cache' => $this->_vars->cache, @@ -1969,7 +1973,12 @@ class IMP_Ajax_Application extends Horde_Core_Ajax_Application } $list_msg = new IMP_Views_ListMessages(); - return $list_msg->listMessages($args); + $msgs = $list_msg->listMessages($args); + + // Reopen the session. + session_start(); + + return $msgs; } /**