mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-06-18 03:31:22 +00:00
fix: routers should only use dht if enabled (#885)
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user