From 5fe29e98f5a9f4d0851eab365dbbaa65f5133b01 Mon Sep 17 00:00:00 2001 From: Josh Stompro Date: Fri, 24 Jul 2015 14:20:21 -0500 Subject: [PATCH] LP#1478123: fix leak of file descriptors by Apache workers Apache backends handling TPAC requests and making requests of the added content handler were not properly closing their sockets. This patch adds a close() after the shutdown() to plug the leak. Signed-off-by: Josh Stompro Signed-off-by: Galen Charlton --- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm | 5 ++++- 1 file changed, 4 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 8170b6d141..2d30373bbb 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm @@ -564,7 +564,10 @@ sub added_content_stage2 { } } # To avoid a lot of hanging connections. - $content->{request}->shutdown(2) if ($content->{request}); + if ($content->{request}) { + $content->{request}->shutdown(2); + $content->{request}->close(); + } } } -- 2.11.0