Simplify haveDhtServers()
A bit too much functional programming, lol.
This commit is contained in:
parent
d4c3a690ab
commit
d1c0b95a9c
|
@ -997,11 +997,8 @@ func (cl *Client) dhtPort() (ret uint16) {
|
|||
return
|
||||
}
|
||||
|
||||
func (cl *Client) haveDhtServer() (ret bool) {
|
||||
cl.eachDhtServer(func(_ DhtServer) {
|
||||
ret = true
|
||||
})
|
||||
return
|
||||
func (cl *Client) haveDhtServer() bool {
|
||||
return len(cl.dhtServers) > 0
|
||||
}
|
||||
|
||||
// Process incoming ut_metadata message.
|
||||
|
|
Loading…
Reference in New Issue