added .1 second sleep to inbound processer when it goes nuts on reading empty socket...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 6 Sep 2006 04:20:27 +0000 (04:20 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 6 Sep 2006 04:20:27 +0000 (04:20 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5973 dcc99617-32d9-48b4-a31d-7c20da2025e4

OpenSRF/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 {