summaryrefslogtreecommitdiffstats
path: root/server/monitor
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2009-12-15 14:18:06 -0500
committerStephen Gallagher <sgallagh@redhat.com>2009-12-15 15:37:29 -0500
commit860d9f273e36ffb69f16377949b8ba9444ac99bf (patch)
treee845ec11bc26825fe60f41438e7111301ee9a35d /server/monitor
parent15419ddafb9af79cce99a80ad3d0503d07ada55d (diff)
downloadsssd-860d9f273e36ffb69f16377949b8ba9444ac99bf.tar.gz
sssd-860d9f273e36ffb69f16377949b8ba9444ac99bf.tar.xz
sssd-860d9f273e36ffb69f16377949b8ba9444ac99bf.zip
Fix tight loop in monitor
If the domain heartbeat time was explicitly set in the configuration to 0, we would enter a tight loop in the heartbeat check and never answer requests from the child processes.
Diffstat (limited to 'server/monitor')
-rw-r--r--server/monitor/monitor.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/monitor/monitor.c b/server/monitor/monitor.c
index d47b3a80a..30df2cb9c 100644
--- a/server/monitor/monitor.c
+++ b/server/monitor/monitor.c
@@ -1060,6 +1060,11 @@ static int get_service_config(struct mt_ctx *ctx, const char *name,
return ret;
}
+ /* 'timeout = 0' should be translated to the default */
+ if (svc->ping_time == 0) {
+ svc->ping_time = MONITOR_DEF_PING_TIME;
+ }
+
*svc_cfg = svc;
talloc_free(path);