From 85e7a606a603dd10c4902d3d55ded7ba958f985c Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Thu, 4 Jul 2019 21:58:13 -0700 Subject: [PATCH] standard --- lib/client/udp-tracker.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/client/udp-tracker.js b/lib/client/udp-tracker.js index 56e1b8a..99ee5b9 100644 --- a/lib/client/udp-tracker.js +++ b/lib/client/udp-tracker.js @@ -5,7 +5,7 @@ const compact2string = require('compact2string') const debug = require('debug')('bittorrent-tracker:udp-tracker') const dgram = require('dgram') const randombytes = require('randombytes') -const url = require('url') +const URL = require('url').URL const common = require('../common') const Tracker = require('./tracker') @@ -73,7 +73,7 @@ class UDPTracker extends Tracker { _request (opts) { const self = this if (!opts) opts = {} - const parsedUrl = url.parse(this.announceUrl) + const parsedUrl = new URL(this.announceUrl) let transactionId = genTransactionId() let socket = dgram.createSocket('udp4')