From 6504b7b50a064585b70afcb362d2f98ad3e7a278 Mon Sep 17 00:00:00 2001 From: erickson Date: Mon, 9 May 2005 13:51:09 +0000 Subject: [PATCH] Let the onslaught continue... changed recv to recv(timeout =>20) in gather usual demo updates moving forward git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@308 9efc2488-bf62-4759-914b-345cdb29e865 --- src/libtransport/generic_utils.c | 1 + src/perlmods/OpenSRF/AppSession.pm | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libtransport/generic_utils.c b/src/libtransport/generic_utils.c index 67d196b..6183954 100644 --- a/src/libtransport/generic_utils.c +++ b/src/libtransport/generic_utils.c @@ -16,6 +16,7 @@ void get_timestamp( char buf_36chars[]) { strcat(buf_36chars,mil); free(localtime); } + double get_timestamp_millis() { struct timeb t; ftime(&t); diff --git a/src/perlmods/OpenSRF/AppSession.pm b/src/perlmods/OpenSRF/AppSession.pm index da3f4d6..4f408ff 100644 --- a/src/perlmods/OpenSRF/AppSession.pm +++ b/src/perlmods/OpenSRF/AppSession.pm @@ -807,6 +807,7 @@ sub send { sub finish { my $self = shift; + return unless $self->session; $self->session->remove_app_request($self); delete($$self{$_}) for (keys %$self); } @@ -942,7 +943,7 @@ sub gather { my $self = shift; my $finish = shift; $self->wait_complete; - my $resp = $self->recv; + my $resp = $self->recv( timeout => 20 ); if( $self->failed() ) { throw OpenSRF::EX::ERROR ($self->failed()->stringify()); -- 2.11.0