Detect remote disconnect in Perl XMPP reader user/berick/perl-loop-on-dead-socket
authorBill Erickson <berick@esilibrary.com>
Mon, 20 Feb 2012 19:40:30 +0000 (14:40 -0500)
committerBill Erickson <berick@esilibrary.com>
Wed, 29 Feb 2012 14:19:52 +0000 (09:19 -0500)
commit94d6f876be7967cc9ff45308aae96a5313124318
treec8cdf2ef636ca49c03a0c7fae307eebfbd2134c5
parentcc7a12f74a9ce4555d5abd8989dfab43290fb41c
Detect remote disconnect in Perl XMPP reader

When the jabber server severs the connection, it leaves the Perl libs
with a socket that perpetually appears ready for reading, but always
returns 0 bytes.  This produces a loop in the client code.  This change
detects this situation, logs an error, and throws an exception.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
src/perl/lib/OpenSRF/Transport/SlimJabber/XMPPReader.pm