Skip to content

Commit 85e7a60

Browse files
committed
standard
1 parent c37aac7 commit 85e7a60

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/client/udp-tracker.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const compact2string = require('compact2string')
55
const debug = require('debug')('bittorrent-tracker:udp-tracker')
66
const dgram = require('dgram')
77
const randombytes = require('randombytes')
8-
const url = require('url')
8+
const URL = require('url').URL
99

1010
const common = require('../common')
1111
const Tracker = require('./tracker')
@@ -73,7 +73,7 @@ class UDPTracker extends Tracker {
7373
_request (opts) {
7474
const self = this
7575
if (!opts) opts = {}
76-
const parsedUrl = url.parse(this.announceUrl)
76+
const parsedUrl = new URL(this.announceUrl)
7777
let transactionId = genTransactionId()
7878
let socket = dgram.createSocket('udp4')
7979

0 commit comments

Comments
 (0)