Skip to content

Commit

Permalink
Merge pull request #7829 from omoerbeek/backport-7790
Browse files Browse the repository at this point in the history
auth backport 7790 to 4.1.x: Minimal fix to avoid busy looping on lots of notifies.
  • Loading branch information
omoerbeek committed May 28, 2019
2 parents c886fa5 + 6fed602 commit a3f73e5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pdns/communicator.cc
Expand Up @@ -136,7 +136,10 @@ void CommunicatorClass::mainloop(void)
if (extraSlaveRefresh)
slaveRefresh(&P);
}
else {
else {
// eat up extra posts to avoid busy looping if many posts were done
while (d_any_sem.tryWait() == 0) {
}
break; // something happened
}
// this gets executed at least once every second
Expand Down

0 comments on commit a3f73e5

Please sign in to comment.