Fix rare crash due to bad DHT node IDs

This commit is contained in:
Matt Joiner 2015-06-08 18:16:29 +10:00
parent d63c5e5b98
commit a6b5ac60ad
1 changed files with 1 additions and 1 deletions

View File

@ -772,7 +772,7 @@ func (s *Server) getNode(addr dHTAddr, id string) (n *node) {
n = &node{
addr: addr,
}
if id != "" {
if len(id) == 20 {
n.SetIDFromString(id)
}
if len(s.nodes) >= maxNodes {