Simplify haveDhtServers()

A bit too much functional programming, lol.
This commit is contained in:
YenForYang 2021-09-02 22:03:47 -05:00 committed by Matt Joiner
parent d4c3a690ab
commit d1c0b95a9c
1 changed files with 2 additions and 5 deletions

View File

@ -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.