From: erickson Date: Mon, 26 Mar 2007 17:41:51 +0000 (+0000) Subject: forcing int on timeout values in process and timed_read X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=74a6254b6e7cc4d38306fa32a309d5ecad3e742a;p=opensrf%2Fbjwebb.git forcing int on timeout values in process and timed_read git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@853 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/perlmods/OpenSRF/Transport/SlimJabber/Client.pm b/src/perlmods/OpenSRF/Transport/SlimJabber/Client.pm index 1122457..657f719 100644 --- a/src/perlmods/OpenSRF/Transport/SlimJabber/Client.pm +++ b/src/perlmods/OpenSRF/Transport/SlimJabber/Client.pm @@ -178,6 +178,7 @@ sub set_block { sub timed_read { my ($self, $timeout) = @_; + $timeout = defined($timeout) ? int($timeout) : undef; $logger->transport( "Temp Buffer Contained: \n". $self->{temp_buffer}, INTERNAL) if $self->{temp_buffer}; if( $self->can( "app" ) ) { @@ -549,7 +550,8 @@ sub process { my( $self, $timeout ) = @_; $timeout ||= 0; - undef $timeout if ( $timeout == -1 ); + $timeout = int($timeout); + undef $timeout if ( $timeout < 0 ); unless( $self->{_socket}->connected ) { OpenSRF::EX::JabberDisconnected->throw(