mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2025-01-19 04:31:36 +00:00
Merge pull request #137 from fanatid/feature/buffer-equals
buffer-equals instead buffer-equal
This commit is contained in:
commit
35697f5187
@ -1,6 +1,6 @@
|
|||||||
module.exports = parseUdpRequest
|
module.exports = parseUdpRequest
|
||||||
|
|
||||||
var bufferEqual = require('buffer-equal')
|
var bufferEquals = require('buffer-equals')
|
||||||
var ipLib = require('ip')
|
var ipLib = require('ip')
|
||||||
var common = require('../common')
|
var common = require('../common')
|
||||||
|
|
||||||
@ -14,7 +14,7 @@ function parseUdpRequest (msg, rinfo) {
|
|||||||
type: 'udp'
|
type: 'udp'
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!bufferEqual(params.connectionId, common.CONNECTION_ID)) {
|
if (!bufferEquals(params.connectionId, common.CONNECTION_ID)) {
|
||||||
throw new Error('received packet with invalid connection id')
|
throw new Error('received packet with invalid connection id')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bencode": "^0.8.0",
|
"bencode": "^0.8.0",
|
||||||
"bn.js": "^4.4.0",
|
"bn.js": "^4.4.0",
|
||||||
"buffer-equal": "^1.0.0",
|
"buffer-equals": "^1.0.3",
|
||||||
"compact2string": "^1.2.0",
|
"compact2string": "^1.2.0",
|
||||||
"debug": "^2.0.0",
|
"debug": "^2.0.0",
|
||||||
"hat": "0.0.3",
|
"hat": "0.0.3",
|
||||||
|
Loading…
Reference in New Issue
Block a user