mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2025-01-31 02:21:36 +00:00
standard
This commit is contained in:
parent
c37aac7277
commit
85e7a606a6
@ -5,7 +5,7 @@ const compact2string = require('compact2string')
|
|||||||
const debug = require('debug')('bittorrent-tracker:udp-tracker')
|
const debug = require('debug')('bittorrent-tracker:udp-tracker')
|
||||||
const dgram = require('dgram')
|
const dgram = require('dgram')
|
||||||
const randombytes = require('randombytes')
|
const randombytes = require('randombytes')
|
||||||
const url = require('url')
|
const URL = require('url').URL
|
||||||
|
|
||||||
const common = require('../common')
|
const common = require('../common')
|
||||||
const Tracker = require('./tracker')
|
const Tracker = require('./tracker')
|
||||||
@ -73,7 +73,7 @@ class UDPTracker extends Tracker {
|
|||||||
_request (opts) {
|
_request (opts) {
|
||||||
const self = this
|
const self = this
|
||||||
if (!opts) opts = {}
|
if (!opts) opts = {}
|
||||||
const parsedUrl = url.parse(this.announceUrl)
|
const parsedUrl = new URL(this.announceUrl)
|
||||||
let transactionId = genTransactionId()
|
let transactionId = genTransactionId()
|
||||||
let socket = dgram.createSocket('udp4')
|
let socket = dgram.createSocket('udp4')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user