From 74a6254b6e7cc4d38306fa32a309d5ecad3e742a Mon Sep 17 00:00:00 2001 From: erickson Date: Mon, 26 Mar 2007 17:41:51 +0000 Subject: [PATCH 1/1] 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 --- src/perlmods/OpenSRF/Transport/SlimJabber/Client.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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( -- 2.43.2