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); my @ready = $select->can_read(1);
next if !@ready; next if !@ready;
my $server = shift @ready; while (my $server = shift @ready) {
my ($client, $hisaddr) = $server->accept; my ($client, $hisaddr) = $server->accept;
if (!$hisaddr) { if (!$hisaddr) {
@ -234,6 +233,7 @@ while (1) {
$qpsmtpd->run(); $qpsmtpd->run();
exit; # child leaves exit; # child leaves
}
} }
sub log { sub log {