From 235fc6427c73d046f9b65f0884e1983c73aaff9c Mon Sep 17 00:00:00 2001 From: Sasha Klizhentas Date: Wed, 8 Jun 2016 17:05:12 -0700 Subject: [PATCH] update retry strategy --- lib/auth/tun.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/auth/tun.go b/lib/auth/tun.go index 46a3abd20e8c0..c66ed0c8ae649 100644 --- a/lib/auth/tun.go +++ b/lib/auth/tun.go @@ -42,7 +42,7 @@ import ( // dialRetryInterval specifies the time interval tun client waits to retry // dialing the same auth server -const dialRetryInterval = time.Duration(time.Second) +const dialRetryInterval = 100 * time.Millisecond // AuthTunnel listens on TCP/IP socket and accepts SSH connections. It then establishes // an SSH tunnell which HTTP requests travel over. In other words, the Auth Service API @@ -621,7 +621,7 @@ func (c *TunClient) GetDialer() AccessPointDialer { if err == nil { return conn, nil } - time.Sleep(dialRetryInterval * time.Duration(attempt)) + time.Sleep(4 * time.Duration(attempt) * dialRetryInterval) } log.Error(err) return nil, trace.Wrap(err)