Changes for bittorrent-protocol@2
This commit is contained in:
parent
3b97b75c15
commit
f77090a35c
3
index.js
3
index.js
|
@ -37,7 +37,6 @@ module.exports = function (metadata) {
|
|||
|
||||
ut_metadata.prototype.onHandshake = function (infoHash, peerId, extensions) {
|
||||
this._infoHash = infoHash
|
||||
this._infoHashHex = infoHash.toString('hex')
|
||||
}
|
||||
|
||||
ut_metadata.prototype.onExtendedHandshake = function (handshake) {
|
||||
|
@ -126,7 +125,7 @@ module.exports = function (metadata) {
|
|||
} catch (err) {}
|
||||
|
||||
// check hash
|
||||
if (this._infoHashHex && this._infoHashHex !== sha1.sync(metadata)) {
|
||||
if (this._infoHash && this._infoHash !== sha1.sync(metadata)) {
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue