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 = {
26
26
pull (
27
27
argv . ipfs . pingPullStream ( peerId , { count } ) ,
28
28
pullCatch ( err => {
29
- throw err
29
+ throw err
30
30
} ) ,
31
31
drain ( ( { Time, Text } ) => {
32
32
// 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) {
48
48
return source . end ( err )
49
49
}
50
50
51
- let packetCount = 0
51
+ let packetCount = 0
52
52
let totalTime = 0
53
53
source . push ( getPacket ( { Success : true , Text : `PING ${ peerId } ` } ) )
54
54
@@ -57,7 +57,7 @@ module.exports = function ping (self) {
57
57
totalTime += time
58
58
packetCount ++
59
59
if ( packetCount >= count ) {
60
- const average = totalTime / count
60
+ const average = totalTime / count
61
61
p . stop ( )
62
62
source . push ( getPacket ( { Success : true , Text : `Average latency: ${ average } ms` } ) )
63
63
source . end ( )
@@ -73,7 +73,7 @@ module.exports = function ping (self) {
73
73
74
74
p . start ( )
75
75
} )
76
-
76
+
77
77
cb ( null , response )
78
78
} )
79
79
}
Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ exports.get = {
13
13
query : Joi . object ( ) . keys ( {
14
14
n : Joi . alternatives ( )
15
15
. when ( 'count' , {
16
- is : true , then : Joi . any ( ) . forbidden ( ) ,
16
+ is : true ,
17
+ then : Joi . any ( ) . forbidden ( ) ,
17
18
otherwise : Joi . number ( ) . greater ( 0 )
18
19
} ) ,
19
20
count : Joi . number ( ) . greater ( 0 ) ,
You can’t perform that action at this time.
0 commit comments