This repository was archived by the owner on Feb 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ module.exports = {
2626 pull (
2727 argv . ipfs . pingPullStream ( peerId , { count } ) ,
2828 pullCatch ( err => {
29- throw err
29+ throw err
3030 } ) ,
3131 drain ( ( { Time, Text } ) => {
3232 // Check if it's a pong
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ module.exports = function ping (self) {
4848 return source . end ( err )
4949 }
5050
51- let packetCount = 0
51+ let packetCount = 0
5252 let totalTime = 0
5353 source . push ( getPacket ( { Success : true , Text : `PING ${ peerId } ` } ) )
5454
@@ -57,7 +57,7 @@ module.exports = function ping (self) {
5757 totalTime += time
5858 packetCount ++
5959 if ( packetCount >= count ) {
60- const average = totalTime / count
60+ const average = totalTime / count
6161 p . stop ( )
6262 source . push ( getPacket ( { Success : true , Text : `Average latency: ${ average } ms` } ) )
6363 source . end ( )
@@ -73,7 +73,7 @@ module.exports = function ping (self) {
7373
7474 p . start ( )
7575 } )
76-
76+
7777 cb ( null , response )
7878 } )
7979}
Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ exports.get = {
1313 query : Joi . object ( ) . keys ( {
1414 n : Joi . alternatives ( )
1515 . when ( 'count' , {
16- is : true , then : Joi . any ( ) . forbidden ( ) ,
16+ is : true ,
17+ then : Joi . any ( ) . forbidden ( ) ,
1718 otherwise : Joi . number ( ) . greater ( 0 )
1819 } ) ,
1920 count : Joi . number ( ) . greater ( 0 ) ,
You can’t perform that action at this time.
0 commit comments