From f60ecec0dc73c11d45737ab7c9311b8577cde2b8 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Thu, 24 Mar 2016 03:25:31 -0700 Subject: [PATCH] remove buffer-equals dependency --- lib/server/parse-udp.js | 3 +-- package.json | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/server/parse-udp.js b/lib/server/parse-udp.js index e57e53b..a189ae5 100644 --- a/lib/server/parse-udp.js +++ b/lib/server/parse-udp.js @@ -1,6 +1,5 @@ module.exports = parseUdpRequest -var bufferEquals = require('buffer-equals') var ipLib = require('ip') var common = require('../common') @@ -14,7 +13,7 @@ function parseUdpRequest (msg, rinfo) { type: 'udp' } - if (!bufferEquals(params.connectionId, common.CONNECTION_ID)) { + if (!common.CONNECTION_ID.equals(params.connectionId)) { throw new Error('received packet with invalid connection id') } diff --git a/package.json b/package.json index c354e25..acc6084 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,6 @@ "dependencies": { "bencode": "^0.8.0", "bn.js": "^4.4.0", - "buffer-equals": "^1.0.3", "compact2string": "^1.2.0", "debug": "^2.0.0", "hat": "0.0.3",