From: Daniel Kahn Gillmor Date: Tue, 9 Mar 2010 01:16:04 +0000 (-0500) Subject: enable concurrent connections to the validation agent by forking the server X-Git-Tag: msva-perl/0.1~13 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=b2e7372eda5f0a30d149474299366e34554a6a7e;p=monkeysphere-validation-agent.git enable concurrent connections to the validation agent by forking the server --- diff --git a/msva b/msva index ff75909..3b5ce80 100755 --- 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');