added .1 second sleep to inbound processer when it goes nuts on reading empty socket...
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Wed, 6 Sep 2006 04:20:27 +0000 (04:20 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Wed, 6 Sep 2006 04:20:27 +0000 (04:20 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@780 9efc2488-bf62-4759-914b-345cdb29e865

src/perlmods/OpenSRF/Transport/SlimJabber/Inbound.pm

index 81240bc..32b7e7e 100644 (file)
@@ -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 {