From 9159d446b072ee6b5eed508f613c4e84e46dfab8 Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 21 Apr 2006 13:04:47 +0000 Subject: [PATCH] added some more diagnostic logging if we have no data to send to the unixserver, we don't try git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@703 9efc2488-bf62-4759-914b-345cdb29e865 --- src/perlmods/OpenSRF/Transport/SlimJabber/Inbound.pm | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/perlmods/OpenSRF/Transport/SlimJabber/Inbound.pm b/src/perlmods/OpenSRF/Transport/SlimJabber/Inbound.pm index 2bae137..81240bc 100644 --- a/src/perlmods/OpenSRF/Transport/SlimJabber/Inbound.pm +++ b/src/perlmods/OpenSRF/Transport/SlimJabber/Inbound.pm @@ -144,23 +144,33 @@ sub listen { my $sock = $self->unix_sock(); my $o; + $logger->debug("Inbound listener calling process()"); + try { $o = $self->process( -1 ); + $logger->debug("Inbound listener received ".length($o)." bytes of data"); + + if(!$o){$logger->error( + "Inbound received no data from the Jabber socket in process()")} + } catch OpenSRF::EX::JabberDisconnected with { + $logger->error("Inbound process lost its ". "jabber connection. Attempting to reconnect..."); $self->initialize; + $o = undef; }; - if(defined $o) { + + if($o) { my $socket = IO::Socket::UNIX->new( Peer => $sock ); - throw OpenSRF::EX::Socket( "Unable to connect to UnixServer: socket-file: $sock \n :=> $! " ) + throw OpenSRF::EX::Socket( + "Unable to connect to UnixServer: socket-file: $sock \n :=> $! " ) unless ($socket->connected); print $socket $o; $socket->close; - } - + } } throw OpenSRF::EX::Socket( "How did we get here?!?!" ); -- 2.11.0