diff --git a/index.js b/index.js index b1d898f..fa12638 100644 --- a/index.js +++ b/index.js @@ -341,12 +341,12 @@ class DHT extends EventEmitter { setEphemeral (ephemeral = false, cb) { if (ephemeral === true) { - this._io._updateId(null) + this._io.id = null this.ephemeral = true if (cb) process.nextTick(cb) return } - this._io._updateId(this.id) + this._io.id = this.id this.bootstrap((err) => { if (err) { if (cb) cb(err) diff --git a/lib/io.js b/lib/io.js index c9ed589..f0da170 100644 --- a/lib/io.js +++ b/lib/io.js @@ -294,10 +294,6 @@ class IO { value }, peer, callback) } - - _updateId (id) { - this.id = id - } } IO.QUERY = QUERY