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

@ -36,7 +36,7 @@ class PeerRouting {
this._routers = libp2p._modules.peerRouting || []
// If we have the dht, add it to the available peer routers
if (libp2p._dht) {
if (libp2p._dht && libp2p._config.dht.enabled) {
this._routers.push(libp2p._dht)
}