1
0
mirror of https://github.com/umputun/reproxy.git synced 2025-09-16 08:46:17 +02:00

don't run discovery if no providers

This commit is contained in:
Umputun
2021-04-11 14:21:58 -05:00
parent a769cc89d5
commit 46d83f235e

View File

@@ -97,11 +97,13 @@ func main() {
}
svc := discovery.NewService(providers)
go func() {
if e := svc.Run(context.Background()); e != nil {
log.Fatalf("[ERROR] discovery failed, %v", e)
}
}()
if len(providers) > 0 {
go func() {
if e := svc.Run(context.Background()); e != nil {
log.Fatalf("[ERROR] discovery failed, %v", e)
}
}()
}
sslConfig, err := makeSSLConfig()
if err != nil {