mirror of
https://github.com/kemko/reproxy.git
synced 2026-01-04 17:25:49 +03:00
don't run discovery if no providers
This commit is contained in:
12
app/main.go
12
app/main.go
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user