|
From: <jgr...@us...> - 2003-02-17 22:36:31
|
Update of /cvsroot/popfile/engine/Proxy
In directory sc8-pr-cvs1:/tmp/cvs-serv14797/Proxy
Modified Files:
POP3.pm
Log Message:
In the POP3 module only accept one connection per call to service() because some users were complaining about how this spiked the CPU to 100%. This is somewhat of a hack because it would be nice to accept many connections at a time but Windows fork() seems to be greedy and so for the moment I'll go with someone a little Windows specific
Index: POP3.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Proxy/POP3.pm,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** POP3.pm 17 Feb 2003 22:18:28 -0000 1.32
--- POP3.pm 17 Feb 2003 22:36:27 -0000 1.33
***************
*** 270,280 ****
}
! # Accept a connection from a client trying to use us as the mail server. We service one client at a time
! # and all others get queued up to be dealt with later. We check the alive boolean here to make sure we
! # are still allowed to operate. See if there's a connection waiting on the $server by getting the list of
! # handles with data to read, if the handle is the server then we're off.
! # If we have some handles left, accept a connection
! while ( ( defined( $self->{selector}->can_read(0) ) ) && ( $self->{alive} ) ) {
if ( my $client = $self->{server}->accept() ) {
# Check that this is a connection from the local machine, if it's not then we drop it immediately
--- 270,276 ----
}
! # Accept a connection from a client trying to use us as the mail server.
! if ( ( defined( $self->{selector}->can_read(0) ) ) && ( $self->{alive} ) ) {
if ( my $client = $self->{server}->accept() ) {
# Check that this is a connection from the local machine, if it's not then we drop it immediately
|