From ba4cc5eec121c5016af0f54907c8fa9585384256 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Tue, 15 Dec 2009 14:18:06 -0500 Subject: 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. --- server/monitor/monitor.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'server/monitor/monitor.c') 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); -- cgit