SVN: toys/rsget.pl/RSGet/HTTPServer.pm

sparky sparky at pld-linux.org
Tue Dec 15 22:00:02 CET 2009


Author: sparky
Date: Tue Dec 15 22:00:01 2009
New Revision: 11045

Modified:
   toys/rsget.pl/RSGet/HTTPServer.pm
Log:
- fixed HTTP Frozen bug (again)


Modified: toys/rsget.pl/RSGet/HTTPServer.pm
==============================================================================
--- toys/rsget.pl/RSGet/HTTPServer.pm	(original)
+++ toys/rsget.pl/RSGet/HTTPServer.pm	Tue Dec 15 22:00:01 2009
@@ -21,7 +21,7 @@
 	my $socket = IO::Socket::INET->new(
 		Proto => 'tcp',
 		LocalPort => $port,
-		Listen => SOMAXCONN,
+		Listen => 5,
 		Reuse => 1,
 		Blocking => 0,
 	) || return undef;
@@ -49,6 +49,8 @@
 	my $post = "";
 	my $OK = 0;
 	eval {
+		local $SIG{__DIE__};
+		delete $SIG{__DIE__};
 		local $SIG{ALRM} = sub { die "HTTP: Frozen !\n"; };
 		alarm 2;
 		$request = <$client>;


More information about the pld-cvs-commit mailing list