mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-23 11:28:59 +00:00
Woops, broke LastSeen
This commit is contained in:
parent
781d63cb2a
commit
f680a63a1f
@ -573,10 +573,12 @@ func (cf cFiler) CurrentFile(file string) protocol.FileInfo {
|
|||||||
// ConnectedTo returns true if we are connected to the named node.
|
// ConnectedTo returns true if we are connected to the named node.
|
||||||
func (m *Model) ConnectedTo(nodeID protocol.NodeID) bool {
|
func (m *Model) ConnectedTo(nodeID protocol.NodeID) bool {
|
||||||
m.pmut.RLock()
|
m.pmut.RLock()
|
||||||
|
_, ok := m.protoConn[nodeID]
|
||||||
|
if ok {
|
||||||
if statRef, ok := m.nodeStatRefs[nodeID]; ok {
|
if statRef, ok := m.nodeStatRefs[nodeID]; ok {
|
||||||
statRef.WasSeen()
|
statRef.WasSeen()
|
||||||
}
|
}
|
||||||
_, ok := m.protoConn[nodeID]
|
}
|
||||||
m.pmut.RUnlock()
|
m.pmut.RUnlock()
|
||||||
return ok
|
return ok
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user