[Opensrf-commits] r1424 - trunk/src/perl/lib/OpenSRF

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Aug 22 08:24:23 EDT 2008


Author: miker
Date: 2008-08-22 08:24:22 -0400 (Fri, 22 Aug 2008)
New Revision: 1424

Modified:
   trunk/src/perl/lib/OpenSRF/AppSession.pm
Log:
adding explicit request timeout detection

Modified: trunk/src/perl/lib/OpenSRF/AppSession.pm
===================================================================
--- trunk/src/perl/lib/OpenSRF/AppSession.pm	2008-08-20 02:55:36 UTC (rev 1423)
+++ trunk/src/perl/lib/OpenSRF/AppSession.pm	2008-08-22 12:24:22 UTC (rev 1424)
@@ -737,6 +737,7 @@
 			$avail = @{ $self->{recv_queue} };
 	}
 
+    $self->timed_out(1) if ( $self->{remaining_recv_timeout} <= 0 );
 
 	my @list;
 	while ( my $msg = shift @{ $self->{recv_queue} } ) {
@@ -751,6 +752,13 @@
 	return @list;
 }
 
+sub timed_out {
+    my $self = shift;
+    my $out = shift;
+    my $self->{timed_out} = $out if (defined $out);
+    return $self->{timed_out};
+}
+
 sub push_resend {
 	my $self = shift;
 	push @OpenSRF::AppSession::_RESEND_QUEUE, @_;



More information about the opensrf-commits mailing list