From: erickson Date: Wed, 6 Sep 2006 04:20:27 +0000 (+0000) Subject: added .1 second sleep to inbound processer when it goes nuts on reading empty socket... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=0741ad613810a0185bbe2a022fe7a1daa53142ef;p=opensrf%2Fbjwebb.git added .1 second sleep to inbound processer when it goes nuts on reading empty socket data.. still not sure what the cause is, but this will prevent the log storm git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@780 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/perlmods/OpenSRF/Transport/SlimJabber/Inbound.pm b/src/perlmods/OpenSRF/Transport/SlimJabber/Inbound.pm index 81240bc..32b7e7e 100644 --- a/src/perlmods/OpenSRF/Transport/SlimJabber/Inbound.pm +++ b/src/perlmods/OpenSRF/Transport/SlimJabber/Inbound.pm @@ -5,6 +5,7 @@ use OpenSRF::EX qw(:try); use OpenSRF::Utils::Logger qw(:level); use OpenSRF::Utils::SettingsClient; use OpenSRF::Utils::Config; +use Time::HiRes qw/usleep/; my $logger = "OpenSRF::Utils::Logger"; @@ -151,8 +152,11 @@ sub listen { $logger->debug("Inbound listener received ".length($o)." bytes of data"); - if(!$o){$logger->error( - "Inbound received no data from the Jabber socket in process()")} + if(!$o){ + $logger->error( + "Inbound received no data from the Jabber socket in process()"); + usleep(100000); # otherwise we loop and pound syslog logger with errors + } } catch OpenSRF::EX::JabberDisconnected with {