This commit is contained in:
Zoltán Papp 2024-10-29 17:15:28 +01:00
parent fc2e4ea134
commit 420a11f785
2 changed files with 2 additions and 0 deletions

View File

@ -213,6 +213,7 @@ func (m *Manager) HasRelayAddress() bool {
}
func (m *Manager) UpdateServerURLs(serverURLs []string) {
log.Infof("update relay server URLs: %v", serverURLs)
m.serverPicker.ServerURLs.Store(serverURLs)
}

View File

@ -42,6 +42,7 @@ func (sp *ServerPicker) PickServer(parentCtx context.Context) (*Client, error) {
successChan := make(chan connResult, 1)
concurrentLimiter := make(chan struct{}, maxConcurrentServers)
log.Debugf("pick server from list: %v", sp.ServerURLs.Load().([]string))
for _, url := range sp.ServerURLs.Load().([]string) {
// todo check if we have a successful connection so we do not need to connect to other servers
concurrentLimiter <- struct{}{}