Improved AC socket fix
authorJason Stephenson <jstephenson@mvlc.org>
Wed, 1 May 2013 16:08:29 +0000 (12:08 -0400)
committerMike Rylander <mrylander@gmail.com>
Wed, 1 May 2013 16:33:19 +0000 (12:33 -0400)
This provides better coverage for socket shutdown needs, but intends
to fix the same issue as the previous commit.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm

index f38c582..b60031a 100644 (file)
@@ -535,9 +535,9 @@ sub added_content_stage2 {
                     }
                 }
             }
-            # To avoid a lot of hanging connections.
-            $req->shutdown(2);
         }
+        # To avoid a lot of hanging connections.
+        $content->{request}->shutdown(2) if ($content->{request});
     }
 }