mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-25 16:08:25 +00:00
Don't crash under suspicious circumstances... (fixes #602)
This commit is contained in:
parent
6c09a77a97
commit
75b26513e1
@ -582,7 +582,11 @@ func (m *Model) AddConnection(rawConn io.Closer, protoConn protocol.Connection)
|
|||||||
fs := m.repoFiles[repo]
|
fs := m.repoFiles[repo]
|
||||||
go sendIndexes(protoConn, repo, fs)
|
go sendIndexes(protoConn, repo, fs)
|
||||||
}
|
}
|
||||||
m.nodeStatRefs[nodeID].WasSeen()
|
if statRef, ok := m.nodeStatRefs[nodeID]; ok {
|
||||||
|
statRef.WasSeen()
|
||||||
|
} else {
|
||||||
|
l.Warnf("AddConnection for unconfigured node %v?", nodeID)
|
||||||
|
}
|
||||||
m.rmut.RUnlock()
|
m.rmut.RUnlock()
|
||||||
m.pmut.Unlock()
|
m.pmut.Unlock()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user