Make sure we process all servers after select()

git-svn-id: https://svn.perl.org/qpsmtpd/trunk@466 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
Matt Sergeant 2005-07-06 12:13:53 +00:00
parent 1e68345cf2
commit 3fc6a4f318

View File

@ -159,8 +159,7 @@ while (1) {
}
my @ready = $select->can_read(1);
next if !@ready;
my $server = shift @ready;
while (my $server = shift @ready) {
my ($client, $hisaddr) = $server->accept;
if (!$hisaddr) {
@ -235,6 +234,7 @@ while (1) {
exit; # child leaves
}
}
sub log {
my ($level,$message) = @_;