From bfd179a1d0f21eaae6b8788f01401d95e11eab3a Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 16 Dec 2009 15:48:59 -0500 Subject: Fix tight-loop in monitor part 2 The first fix only fixed tight loops caused by setting 'timeout=0' in services. This patch also fixes it for domains. --- server/monitor/monitor.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/monitor/monitor.c b/server/monitor/monitor.c index 30df2cb9c..b3174bdab 100644 --- a/server/monitor/monitor.c +++ b/server/monitor/monitor.c @@ -1149,6 +1149,11 @@ static int get_provider_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; + } + talloc_free(path); /* if no provider is present do not run the domain */ -- cgit