Skip to content

Commit

Permalink
Do not pass relayThrough function to dht.connect
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewosh committed Sep 26, 2023
1 parent e9cd8f1 commit 0642240
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,11 @@ module.exports = class Hyperswarm extends EventEmitter {
return
}

const relayThrough = this._maybeRelayConnection()
const conn = this.dht.connect(peerInfo.publicKey, {
relayThrough: this._maybeRelayConnection.bind(this),
relayAddresses: peerInfo.relayAddresses,
keyPair: this.keyPair
keyPair: this.keyPair,
relayThrough
})
this._allConnections.add(conn)

Expand Down

0 comments on commit 0642240

Please sign in to comment.