mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-23 03:18:59 +00:00
Always print hostname on connect (even if something is set in config)
This commit is contained in:
parent
e968560ea4
commit
884aaab751
@ -408,17 +408,17 @@ func (m *Model) ClusterConfig(nodeID protocol.NodeID, config protocol.ClusterCon
|
||||
} else {
|
||||
m.nodeVer[nodeID] = config.ClientName + " " + config.ClientVersion
|
||||
}
|
||||
name := config.GetOption("name")
|
||||
if name != "" {
|
||||
node := m.cfg.GetNodeConfiguration(nodeID)
|
||||
if node != nil && node.Name == "" {
|
||||
l.Infof("Node %s is called %q", nodeID, name)
|
||||
node.Name = name
|
||||
}
|
||||
}
|
||||
m.pmut.Unlock()
|
||||
|
||||
l.Infof(`Node %s client is "%s %s"`, nodeID, config.ClientName, config.ClientVersion)
|
||||
|
||||
if name := config.GetOption("name"); name != "" {
|
||||
l.Infof("Node %s hostname is %q", nodeID, name)
|
||||
node := m.cfg.GetNodeConfiguration(nodeID)
|
||||
if node != nil && node.Name == "" {
|
||||
node.Name = name
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Close removes the peer from the model and closes the underlying connection if possible.
|
||||
|
Loading…
Reference in New Issue
Block a user