Skip to content

Commit

Permalink
Use object shorthand for properties
Browse files Browse the repository at this point in the history
  • Loading branch information
LinusU committed Oct 16, 2021
1 parent fe0df46 commit 6054871
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/client/http-tracker.js
Expand Up @@ -125,7 +125,7 @@ class HTTPTracker extends Tracker {

let request = get.concat({
url: parsedUrl.toString(),
agent: agent,
agent,
timeout: common.REQUEST_TIMEOUT,
headers: {
'user-agent': this.client._userAgent || ''
Expand Down
2 changes: 1 addition & 1 deletion lib/client/udp-tracker.js
Expand Up @@ -258,7 +258,7 @@ class UDPTracker extends Tracker {

function send (message, proxyInfo) {
if (proxyInfo) {
const pack = Socks.createUDPFrame({ host: hostname, port: port }, message)
const pack = Socks.createUDPFrame({ host: hostname, port }, message)
socket.send(pack, 0, pack.length, proxyInfo.port, proxyInfo.host)
} else {
socket.send(message, 0, message.length, port, hostname)
Expand Down
2 changes: 1 addition & 1 deletion lib/client/websocket-tracker.js
Expand Up @@ -186,7 +186,7 @@ class WebSocketTracker extends Tracker {
agent = new Socks.Agent(clone(this.client._proxyOpts.socksProxy), (parsedUrl.protocol === 'wss:'))
}
}
this.socket = socketPool[this.announceUrl] = new Socket({ url: this.announceUrl, agent: agent })
this.socket = socketPool[this.announceUrl] = new Socket({ url: this.announceUrl, agent })
this.socket.consumers = 1
this.socket.once('connect', this._onSocketConnectBound)
}
Expand Down
2 changes: 1 addition & 1 deletion test/client.js
Expand Up @@ -582,7 +582,7 @@ function testClientStartHttpAgent (t, serverType) {
infoHash: fixtures.leaves.parsedTorrent.infoHash,
announce: announceUrl,
peerId: peerId1,
port: port,
port,
wrtc: {},
proxyOpts: {
httpAgent: agent
Expand Down

0 comments on commit 6054871

Please sign in to comment.