mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-03-11 15:34:56 +00:00
fix: panic in nomad watcher because of nil map
url.Values is an uninitialized map.
This commit is contained in:
parent
67b01329a0
commit
2e4bfcce63
1 changed files with 1 additions and 1 deletions
|
@ -45,7 +45,7 @@ type serviceWatcher struct {
|
|||
|
||||
// newNomadWatcher creates new watcher and starts background service discovery for Nomad.
|
||||
func newNomadWatcher(client *discoveryutils.Client, sdc *SDConfig, namespace, region string) *nomadWatcher {
|
||||
var qa url.Values
|
||||
qa := url.Values{}
|
||||
if sdc.AllowStale == nil || *sdc.AllowStale {
|
||||
qa.Set("stale", "")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue