From: Matt Joiner Date: Mon, 17 Aug 2015 16:12:27 +0000 (+1000) Subject: dht: Remove redundant code which caused rare crash X-Git-Tag: v1.0.0~1061 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=288abb1c6b80fd488e2b5cc2a001b62307b8e63d;p=btrtrc.git dht: Remove redundant code which caused rare crash --- 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 {