dht: Remove redundant code which caused rare crash

This commit is contained in:
Matt Joiner 2015-08-18 02:12:27 +10:00
parent 74d3598656
commit 288abb1c6b
1 changed files with 1 additions and 3 deletions

View File

@ -715,9 +715,7 @@ func (s *Server) nodeByID(id string) *node {
} }
func (s *Server) handleQuery(source dHTAddr, m Msg) { func (s *Server) handleQuery(source dHTAddr, m Msg) {
args := m["a"].(map[string]interface{}) node := s.getNode(source, m.SenderID())
node := s.getNode(source, m.ID())
node.SetIDFromString(args["id"].(string))
node.lastGotQuery = time.Now() node.lastGotQuery = time.Now()
// Don't respond. // Don't respond.
if s.config.Passive { if s.config.Passive {