mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Start endpoint tunnel watch before waiting
This commit is contained in:
parent
2d32337334
commit
b93b4732eb
@ -83,7 +83,6 @@ func Setup(config *config.Node) error {
|
||||
disconnect[address] = connect(wg, address, config, transportConfig)
|
||||
}
|
||||
}
|
||||
wg.Wait()
|
||||
|
||||
go func() {
|
||||
connect:
|
||||
@ -134,6 +133,8 @@ func Setup(config *config.Node) error {
|
||||
}
|
||||
}()
|
||||
|
||||
wg.Wait()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -178,6 +179,9 @@ func connect(waitGroup *sync.WaitGroup, address string, config *config.Node, tra
|
||||
})
|
||||
|
||||
if ctx.Err() != nil {
|
||||
if waitGroup != nil {
|
||||
once.Do(waitGroup.Done)
|
||||
}
|
||||
logrus.Infof("Stopped tunnel to %s", wsURL)
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user