From 9db72930fa6134cbc859b4e5c71392c6c856cc89 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 14 May 2012 17:18:58 -0400 Subject: [PATCH] tpac ac part 4 Signed-off-by: Bill Erickson --- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm index ac9d5fc723..f7d09f6eaa 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm @@ -463,7 +463,11 @@ sub added_content_stage2 { my $req = $content->{request}; my $sel = IO::Select->new($req); - if ($sel->can_read(0)) { + # if we are requesting a specific type of content, give the + # backend code a little extra time to retrieve the content. + my $wait = $type eq $sel_type ? 3 : 0; # TODO: config? + + if ($sel->can_read($wait)) { my ($code) = $req->read_response_headers; $content->{status} = $code eq '200' ? 1 : 2; $logger->debug("tpac: added content request for $type returned $code"); -- 2.11.0