Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persist DHT nodes #1431

Open
wants to merge 9 commits into
base: master
from

Allow DHT state loading when bootstrap disabled

Prior logic disabled DHT state load with any bootstrap value,
including a false to disable. Changes to allowing DHT state load
if bootstrap is explicitly disabled with a falsy value.
  • Loading branch information
bookmoons committed Jul 30, 2018
commit d6e090f488eb771850f6d5739c3141af96da0141
@@ -137,7 +137,7 @@ function WebTorrent (opts) {
? path.join(appDataFolder('webtorrent'), 'dht.json')
: opts.dhtState

if (!('bootstrap' in dhtOpts)) {
if (!dhtOpts.bootstrap) {
// Load persisted state
var nodes = dhtPersist.loadNodes(self.dhtSaveFile)
if (nodes) {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.