From 288abb1c6b80fd488e2b5cc2a001b62307b8e63d Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Tue, 18 Aug 2015 02:12:27 +1000 Subject: [PATCH] dht: Remove redundant code which caused rare crash --- dht/dht.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dht/dht.go b/dht/dht.go index db886b46..0cae4163 100644 --- a/dht/dht.go +++ b/dht/dht.go @@ -715,9 +715,7 @@ func (s *Server) nodeByID(id string) *node { } func (s *Server) handleQuery(source dHTAddr, m Msg) { - args := m["a"].(map[string]interface{}) - node := s.getNode(source, m.ID()) - node.SetIDFromString(args["id"].(string)) + node := s.getNode(source, m.SenderID()) node.lastGotQuery = time.Now() // Don't respond. if s.config.Passive {