enable concurrent connections to the validation agent by forking the server
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Tue, 9 Mar 2010 01:16:04 +0000 (20:16 -0500)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Tue, 9 Mar 2010 01:16:04 +0000 (20:16 -0500)
msva

diff --git a/msva b/msva
index ff75909ced0792a2146ab7e146aa6fc8e8d7d3af..3b5ce80f18776eab9c5d14b6f4f18e4530247a77 100755 (executable)
--- a/msva
+++ b/msva
@@ -29,6 +29,7 @@ use strict;
   use IO::Socket;
   use IO::File;
   use Socket;
+  use Net::Server::Fork;
 
   use JSON;
   use POSIX qw(strftime);
@@ -78,11 +79,14 @@ use strict;
     }
   };
 
+  sub net_server {
+    return 'Net::Server::Fork';
+  };
+
   sub new {
     my $class = shift;
     # start the server on port 8901
     my $self = $class->SUPER::new(8901);
-    $self->host('localhost');
 
     $self->{allowed_uids} = {};
     if (exists $ENV{MSVA_ALLOWED_USERS}) {
@@ -375,4 +379,4 @@ use strict;
 }
 
 my $server = MSVA->new();
-$server->run();
+$server->run(host=>'localhost');