Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions pdns/dnsdistdist/dnsdist-lua-bindings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -293,20 +293,16 @@ void setupLuaBindings(LuaContext& luaCtx, bool client, bool configCheck)
return;
}
size_t value = 0;
getOptionalValue<size_t>(vars, "maxCheckFailures", value);
if (value > 0) {
if (getOptionalValue<size_t>(vars, "maxCheckFailures", value) > 0 && value > 0) {
state->d_config.maxCheckFailures.store(value);
}
getOptionalValue<size_t>(vars, "rise", value);
if (value > 0) {
if (getOptionalValue<size_t>(vars, "rise", value) > 0 && value > 0) {
state->d_config.minRiseSuccesses.store(value);
}
getOptionalValue<size_t>(vars, "checkTimeout", value);
if (value > 0) {
if (getOptionalValue<size_t>(vars, "checkTimeout", value) > 0 && value > 0) {
state->d_config.checkTimeout.store(value);
}
getOptionalValue<size_t>(vars, "checkInterval", value);
if (value > 0) {
if (getOptionalValue<size_t>(vars, "checkInterval", value) > 0 && value > 0) {
state->d_config.checkInterval.store(value);
}
});
Expand Down
7 changes: 7 additions & 0 deletions regression-tests.dnsdist/test_HealthChecks.py
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,13 @@ def testLatency(self):
# introduce 500 ms of latency
self.setDelay(0.5)

# consume any value received in the meantime (it does happen on GH actions runners)
try:
while self.wait1(False):
pass
except queue.Empty:
pass

self.wait1(True)

# should have no failures, still up
Expand Down
Loading