adding explicit request timeout detection
authormiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Fri, 22 Aug 2008 12:24:22 +0000 (12:24 +0000)
committermiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Fri, 22 Aug 2008 12:24:22 +0000 (12:24 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1424 9efc2488-bf62-4759-914b-345cdb29e865

src/perl/lib/OpenSRF/AppSession.pm

index d6bc91a..941e3dd 100644 (file)
@@ -737,6 +737,7 @@ sub recv {
                        $avail = @{ $self->{recv_queue} };
        }
 
                        $avail = @{ $self->{recv_queue} };
        }
 
+    $self->timed_out(1) if ( $self->{remaining_recv_timeout} <= 0 );
 
        my @list;
        while ( my $msg = shift @{ $self->{recv_queue} } ) {
 
        my @list;
        while ( my $msg = shift @{ $self->{recv_queue} } ) {
@@ -751,6 +752,13 @@ sub recv {
        return @list;
 }
 
        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, @_;
 sub push_resend {
        my $self = shift;
        push @OpenSRF::AppSession::_RESEND_QUEUE, @_;