Update net.go

more simple
This commit is contained in:
ANOTHEL 2018-11-27 20:49:33 +09:00 committed by GitHub
parent 8b9f469419
commit 30e5860a5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -567,12 +567,12 @@ loop:
net.ticketStore.searchLookupDone(res.target, res.nodes, func(n *Node, topic Topic) []byte { net.ticketStore.searchLookupDone(res.target, res.nodes, func(n *Node, topic Topic) []byte {
if n.state != nil && n.state.canQuery { if n.state != nil && n.state.canQuery {
return net.conn.send(n, topicQueryPacket, topicQuery{Topic: topic}) // TODO: set expiration return net.conn.send(n, topicQueryPacket, topicQuery{Topic: topic}) // TODO: set expiration
} else { }
if n.state == unknown { if n.state == unknown {
net.ping(n, n.addr()) net.ping(n, n.addr())
} }
return nil return nil
}
}) })
case <-statsDump.C: case <-statsDump.C: