fix: routers should only use dht if enabled (#885)

This commit is contained in:
Vasco Santos
2021-02-11 14:37:34 +01:00
committed by GitHub
parent 9941414a91
commit a34d2bbcc3
4 changed files with 10 additions and 2 deletions

View File

@ -35,7 +35,7 @@ class ContentRouting {
this.dht = libp2p._dht
// If we have the dht, add it to the available content routers
if (this.dht) {
if (this.dht && libp2p._config.dht.enabled) {
this.routers.push(this.dht)
}
}