[Bps-public-commit] r11242 - in Net-Server-Coro: .

alexmv at bestpractical.com alexmv at bestpractical.com
Thu Mar 27 15:51:47 EDT 2008


Author: alexmv
Date: Thu Mar 27 15:51:24 2008
New Revision: 11242

Modified:
   Net-Server-Coro/   (props changed)
   Net-Server-Coro/lib/Net/Server/Coro.pm

Log:
 r28893 at kohr-ah:  chmrr | 2008-03-27 15:51:04 -0400
  * Net::Server closes $self->{server}{client}, which is not what you
    want if you have more than one client.


Modified: Net-Server-Coro/lib/Net/Server/Coro.pm
==============================================================================
--- Net-Server-Coro/lib/Net/Server/Coro.pm	(original)
+++ Net-Server-Coro/lib/Net/Server/Coro.pm	Thu Mar 27 15:51:24 2008
@@ -80,6 +80,12 @@
     close $fh;
 }
 
+# We override this to do nothing, or Net::Server closes
+# $self->{server}{client} -- which is he most recent connection, not
+# necessarily the current connection.  We also don't want the
+# STDERR/STDOUT redirection.
+sub post_process_request {}
+
 =head2 loop
 
 The main loop uses starts a number of L<Coro> coroutines:
@@ -107,6 +113,7 @@
 sub loop {
     my $self = shift;
     my $prop = $self->{server};
+    $prop->{no_client_stdout} = 1;
 
     for my $socket ( @{ $prop->{sock} } ) {
         async {



More information about the Bps-public-commit mailing list