File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 1- const Buffer = require ( 'safe-buffer' ) . Buffer
1+ const { Buffer } = require ( 'safe-buffer' )
22const bencode = require ( 'bencode' )
33const debug = require ( 'debug' ) ( 'bittorrent-tracker:server' )
44const dgram = require ( 'dgram' )
@@ -272,8 +272,7 @@ class Server extends EventEmitter {
272272 }
273273
274274 _onError ( err ) {
275- const self = this
276- self . emit ( 'error' , err )
275+ this . emit ( 'error' , err )
277276 }
278277
279278 listen ( ...args ) /* port, hostname, onlistening */ {
@@ -426,8 +425,7 @@ class Server extends EventEmitter {
426425 } )
427426 }
428427
429- onWebSocketConnection ( socket , opts ) {
430- if ( ! opts ) opts = { }
428+ onWebSocketConnection ( socket , opts = { } ) {
431429 opts . trustProxy = opts . trustProxy || this . _trustProxy
432430
433431 socket . peerId = null // as hex
You can’t perform that action at this time.
0 commit comments