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.
This commit is contained in:
Frank Schroeder 2017-06-07 13:12:34 +02:00
parent 9224daf585
commit fe69de3bba
No known key found for this signature in database
GPG Key ID: 4D65C6EAEC87DECD
1 changed files with 1 additions and 1 deletions

View File

@ -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