Skip to content

Commit

Permalink
update retry strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
klizhentas committed Jun 9, 2016
1 parent 84c12af commit 235fc64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/auth/tun.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 235fc64

Please sign in to comment.