From: Mike Rylander Date: Wed, 1 Nov 2017 22:22:21 +0000 (-0400) Subject: LP#1704396: reset the facet alarm timer X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=dc8a0dee3a7ff82bb5edb3bffc249aa18c7c3340;p=evergreen%2Fpines.git LP#1704396: reset the facet alarm timer When using alarm() one must reset the timer via alarm(0) or incur the wrath of the spurious signal. Conflicts: Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm Signed-off-by: Mike Rylander Signed-off-by: Jason Stephenson --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm index 670076b89f..a60b1561e8 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm @@ -1409,11 +1409,13 @@ sub retrieve_cached_facets { eval { local $SIG{ALRM} = sub {die}; - alarm(2); # we'll sleep for as much as 2s + alarm(10); # we'll sleep for as much as 10s do { die if $cache->get_cache($key . '_COMPLETE'); } while (sleep(0.05)); + alarm(0); }; + alarm(0); my $blob = $cache->get_cache($key) || {};