Changes for bittorrent-protocol@2

This commit is contained in:
Feross Aboukhadijeh 2015-12-02 18:17:15 -08:00
parent 3b97b75c15
commit f77090a35c
1 changed files with 1 additions and 2 deletions

View File

@ -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
}