OpenSRF client disconnect robustification (Perl) user/berick/perl-client-recover-jabber-disconnect
authorBill Erickson <berick@esilibrary.com>
Thu, 5 Dec 2013 17:27:44 +0000 (12:27 -0500)
committerBill Erickson <berick@esilibrary.com>
Thu, 5 Dec 2013 19:28:46 +0000 (14:28 -0500)
commit682bbe68bca871fdc4039360bcaae032807b2f69
tree194ab92e54e6a5feff2453224055db0aad25d40e
parentb93e0ca9c88e76d8a6a3c2451cbb49756c6ecf68
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>
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