OpenSRF client disconnect robustification (Perl)
authorBill Erickson <berick@esilibrary.com>
Thu, 5 Dec 2013 17:27:44 +0000 (12:27 -0500)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 16 Dec 2013 16:21:57 +0000 (08:21 -0800)
commitb0a41d3973c944259c193fb4da1dce7f0c690f70
tree8891822fc2e94651b1a60ed6e26b1e79bff1d75a
parenta0d5b0536231cc06552fb9d7533a713c314ef9d3
OpenSRF client disconnect robustification (Perl)

* Improve detection of client connection state with jabber server

  Be more aggressive in testing and responding to failed connectivity.
  It can happen in various ways, depending on what's happening to the
  jabber server (death, delay, graceful shutdown).  With these changes
  we attempt to cover all the bases and detect as early as possible that
  a connection has died, specifically when trying to create a new
  connection after one has failed.

* Do a better job of cleaning up dead connections

  Transport::PeerHandle now has a reset() action which disconnects (when
  possible) and clears the global connection reference.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
src/perl/lib/OpenSRF/System.pm
src/perl/lib/OpenSRF/Transport/SlimJabber/Client.pm
src/perl/lib/OpenSRF/Transport/SlimJabber/PeerConnection.pm
src/perl/lib/OpenSRF/Transport/SlimJabber/XMPPReader.pm