mirror of
https://github.com/prometheus/alertmanager
synced 2025-01-18 20:20:53 +00:00
Merge pull request #726 from prometheus/peerpanic
cmd: fix panic on empty peer string
This commit is contained in:
commit
9753a7fcc6
@ -385,7 +385,11 @@ func listen(listen string, router *route.Router) {
|
||||
type stringset map[string]struct{}
|
||||
|
||||
func (ss stringset) Set(value string) error {
|
||||
ss[value] = struct{}{}
|
||||
for _, v := range strings.Split(value, ",") {
|
||||
if v = strings.TrimSpace(v); v != "" {
|
||||
ss[v] = struct{}{}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user