Fix crash when relaying or global discovery is disabled (fixes #2246)
This commit is contained in:
parent
64354b51c9
commit
148b2b9d02
@ -192,6 +192,12 @@ func (s *Svc) CommitConfiguration(from, to config.Configuration) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *Svc) ClientStatus() map[string]bool {
|
func (s *Svc) ClientStatus() map[string]bool {
|
||||||
|
if s == nil {
|
||||||
|
// A nil client does not have a status, really. Yet we may be called
|
||||||
|
// this way, for raisins...
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
s.mut.RLock()
|
s.mut.RLock()
|
||||||
status := make(map[string]bool, len(s.clients))
|
status := make(map[string]bool, len(s.clients))
|
||||||
for uri, client := range s.clients {
|
for uri, client := range s.clients {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user