swarm: fix megacheck warnings

This commit is contained in:
Egon Elbre
2017-08-08 20:34:35 +03:00
parent 6ca59d98f8
commit 133de3d806
18 changed files with 39 additions and 108 deletions

View File

@ -355,7 +355,7 @@ func saveSync(record *kademlia.NodeRecord, node kademlia.Node) {
// sends relevant peer data given by the kademlia hive to the requester
// TODO: remember peers sent for duration of the session, only new peers sent
func (self *Hive) peers(req *retrieveRequestMsgData) {
if req != nil && req.MaxPeers >= 0 {
if req != nil {
var addrs []*peerAddr
if req.timeout == nil || time.Now().Before(*(req.timeout)) {
key := req.Key