From: erickson Date: Fri, 21 Apr 2006 13:04:47 +0000 (+0000) Subject: added some more diagnostic logging X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=9159d446b072ee6b5eed508f613c4e84e46dfab8;p=opensrf%2Fbjwebb.git 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 --- 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?!?!" );