lib/model: Use up to date device name, do not provide name to unknown devices (fixes #4164)
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4168
This commit is contained in:
@@ -431,3 +431,11 @@ func (w *Wrapper) StunServers() []string {
|
||||
|
||||
return addresses
|
||||
}
|
||||
|
||||
func (w *Wrapper) MyName() string {
|
||||
w.mut.Lock()
|
||||
myID := w.cfg.MyID
|
||||
w.mut.Unlock()
|
||||
cfg, _ := w.Device(myID)
|
||||
return cfg.Name
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user