added logic to properly stop the findPeers loop upon dht close