perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Malcolm J Harwood <mjhlist-modp...@liminalflux.net>
Subject mp2 broken connection detection
Date Wed, 23 Nov 2005 14:53:40 GMT

The cookbook (recipe 4.9) claims that $c->aborted is only true after you've 
actually sent data to the client and flushed the buffers. For testing if the 
client is still connected, it recommends doing something like:

	$c = Apache->request->connection;
	return if ($c->aborted);
	$s = IO::Select->new($c->fileno);
	return if ($s->can_read(0));
	return 1;

Which presumably works fine with mp1, but doesn't at all with mp2.
	$c->fileno no longer exists
the closest seems to be
	$c->client_socket
but it's not obvious from the documentation how one would check that. Is it 
even needed, or does $c->aborted check whether the socket is open in mp2?



-- 
"One has no desire to be devoured by alien monstrosities,
 even in the cause of political progress".
- Kalik, Dr Who: Carnival of Monsters

Mime
View raw message