Merge branch 'master' into regnaio/location
git merge master
This commit is contained in:
commit
fb6bde9dad
|
@ -114,7 +114,8 @@ func (ed *Edge) GetDifferentAddr(connIndex int) (*allregions.EdgeAddr, error) {
|
||||||
// note: if oldAddr were not nil, it will become available on the next iteration
|
// note: if oldAddr were not nil, it will become available on the next iteration
|
||||||
return nil, errNoAddressesLeft
|
return nil, errNoAddressesLeft
|
||||||
}
|
}
|
||||||
log.Debug().Msg("edgediscovery - GetDifferentAddr: Giving connection its new address")
|
log.Debug().Msgf("edgediscovery - GetDifferentAddr: Giving connection its new address: %v from the address list: %v",
|
||||||
|
addr, ed.regions.AvailableAddrs())
|
||||||
return addr, nil
|
return addr, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -171,17 +171,15 @@ func ServeTunnelLoop(
|
||||||
protocolFallback.protocol,
|
protocolFallback.protocol,
|
||||||
gracefulShutdownC,
|
gracefulShutdownC,
|
||||||
)
|
)
|
||||||
if !recoverable {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
config.Observer.SendReconnect(connIndex)
|
|
||||||
|
|
||||||
|
if recoverable {
|
||||||
duration, ok := protocolFallback.GetMaxBackoffDuration(ctx)
|
duration, ok := protocolFallback.GetMaxBackoffDuration(ctx)
|
||||||
if !ok {
|
if !ok {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
config.Observer.SendReconnect(connIndex)
|
||||||
connLog.Logger().Info().Msgf("Retrying connection in up to %s seconds", duration)
|
connLog.Logger().Info().Msgf("Retrying connection in up to %s seconds", duration)
|
||||||
|
}
|
||||||
|
|
||||||
select {
|
select {
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
|
@ -189,6 +187,10 @@ func ServeTunnelLoop(
|
||||||
case <-gracefulShutdownC:
|
case <-gracefulShutdownC:
|
||||||
return nil
|
return nil
|
||||||
case <-protocolFallback.BackoffTimer():
|
case <-protocolFallback.BackoffTimer():
|
||||||
|
if !recoverable {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
if !selectNextProtocol(
|
if !selectNextProtocol(
|
||||||
connLog.Logger(),
|
connLog.Logger(),
|
||||||
protocolFallback,
|
protocolFallback,
|
||||||
|
|
Loading…
Reference in New Issue