LP#1616501: teach mod_perl handlers how to detect client disconnects
authorMike Rylander <mrylander@gmail.com>
Thu, 4 Aug 2016 12:57:44 +0000 (08:57 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Tue, 21 Feb 2017 21:04:27 +0000 (16:04 -0500)
commit9ca5c3dd2e591f48bdd0a45fe0278f95a4b17e76
tree74a9cbf4a337de205becc642503d1557fdc83840
parentcbd252babff1d7c9c92db8d2b46f6172eb9a3845
LP#1616501: teach mod_perl handlers how to detect client disconnects

This patch provides an API so that mod_perl handlers
that act as OpenSRF clients have a way to specify that
if the browser disconnects, to stop trying to receive
results from an XMPP request.

To invoke it, mod_perl handlers can add the following:

use OpenSRF;
...
sub hander {
...
    my $r = shift;
    OpenSRF->OSRF_APACHE_REQUEST_OBJ($r);
...

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
src/perl/lib/OpenSRF.pm
src/perl/lib/OpenSRF/Transport/SlimJabber/XMPPReader.pm