TUN-3238: Update UI when connection re-connects

This commit is contained in:
Rachel Williams
2020-08-10 16:09:02 -07:00
committed by Areg Harutyunyan
parent b57a953caa
commit 094e0c7592
2 changed files with 29 additions and 10 deletions

View File

@@ -236,6 +236,10 @@ func ServeTunnelLoop(ctx context.Context,
)
if recoverable {
if duration, ok := backoff.GetBackoffDuration(ctx); ok {
if config.ConnEventChan != nil {
config.ConnEventChan <- ui.ConnEvent{Index: connectionIndex, EventType: ui.Reconnecting}
}
config.Logger.Infof("Retrying connection %d in %s seconds", connectionIndex, duration)
backoff.Backoff(ctx)
continue