From fe69de3bbadbfdfce344bb01179ab49709b8e6c2 Mon Sep 17 00:00:00 2001 From: Frank Schroeder Date: Wed, 7 Jun 2017 13:12:34 +0200 Subject: [PATCH] agent: increase graceful shutdown timeout When triggering a leave through an INT/TERM signal the hard-coded timeout of 5 seconds is too short to complete the leave successfully. Therefore, the agent always times out. This value should probably configurable. --- command/agent/command.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/agent/command.go b/command/agent/command.go index 2a778ec44f..1356fe6bb8 100644 --- a/command/agent/command.go +++ b/command/agent/command.go @@ -813,7 +813,7 @@ func (cmd *Command) Run(args []string) int { close(gracefulCh) }() - gracefulTimeout := 5 * time.Second + gracefulTimeout := 15 * time.Second select { case <-signalCh: return 1