This repository was archived by the owner on Feb 1, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -249,7 +249,7 @@ class Server extends EventEmitter {
249249 clients : groupByClient ( )
250250 }
251251
252- if ( req . url === '/stats.json' || req . headers [ ' accept' ] === 'application/json' ) {
252+ if ( req . url === '/stats.json' || req . headers . accept === 'application/json' ) {
253253 res . write ( JSON . stringify ( stats ) )
254254 res . end ( )
255255 } else if ( req . url === '/stats' ) {
Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ test('server: get leecher stats.json', function (t) {
145145 t . equal ( stats . peersSeederOnly , 0 )
146146 t . equal ( stats . peersLeecherOnly , 1 )
147147 t . equal ( stats . peersSeederAndLeecher , 0 )
148- t . equal ( stats . clients [ ' WebTorrent' ] [ '0.91' ] , 1 )
148+ t . equal ( stats . clients . WebTorrent [ '0.91' ] , 1 )
149149
150150 client . destroy ( function ( ) { t . pass ( 'client destroyed' ) } )
151151 server . close ( function ( ) { t . pass ( 'server closed' ) } )
@@ -186,7 +186,7 @@ test('server: get leecher stats.json (unknown peerId)', function (t) {
186186 t . equal ( stats . peersSeederOnly , 0 )
187187 t . equal ( stats . peersLeecherOnly , 1 )
188188 t . equal ( stats . peersSeederAndLeecher , 0 )
189- t . equal ( stats . clients [ ' unknown' ] [ '01234567' ] , 1 )
189+ t . equal ( stats . clients . unknown [ '01234567' ] , 1 )
190190
191191 client . destroy ( function ( ) { t . pass ( 'client destroyed' ) } )
192192 server . close ( function ( ) { t . pass ( 'server closed' ) } )
You can’t perform that action at this time.
0 commit comments