dht.Server.Ping didn't lock structure
This commit is contained in:
parent
2d9c22ae1e
commit
d17a2958a6
|
@ -483,6 +483,8 @@ func (cni *NodeInfo) UnmarshalCompact(b []byte) error {
|
|||
}
|
||||
|
||||
func (s *Server) Ping(node *net.UDPAddr) (*transaction, error) {
|
||||
s.mu.Lock()
|
||||
defer s.mu.Unlock()
|
||||
return s.query(node, "ping", nil)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue