Skip to content

Commit

Permalink
[backend] BSStdServer: add two comments to clarify the code
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Sep 29, 2023
1 parent 95a65d6 commit 1e351c6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/backend/BSStdServer.pm
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,15 @@ sub periodic_ajax {
if (!$conf->{'exiting'}) {
my @s = stat(BSServer::getserverlock());
return if $s[3];
# somebody removed our lock file. exit the server.
my $sev = $conf->{'server_ev'};
close($sev->{'fd'});
BSEvents::rem($sev);
BSServer::msg("AJAX: $conf->{'name'} exiting.");
$conf->{'exiting'} = 10 + 1;
}
my @events = BSEvents::allevents();
# there always is the periodic concheck handler, thus we check for <= 1
if (@events <= 1 || --$conf->{'exiting'} == 0) {
BSServer::msg("AJAX: $conf->{'name'} goodbye.");
exit(0);
Expand Down

0 comments on commit 1e351c6

Please sign in to comment.