Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit 3c695af

Browse files
authored
Merge pull request #778 from ipfs/fix/ping-pong
fix: correctly differentiate pong responses
2 parents 7ee17ba + 4ad25a3 commit 3c695af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/ping.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const f = require('./utils/factory')
1717

1818
// Determine if a ping response object is a pong, or something else, like a status message
1919
function isPong (pingResponse) {
20-
return Boolean(pingResponse && pingResponse.time)
20+
return Boolean(pingResponse && pingResponse.success && !pingResponse.text)
2121
}
2222

2323
describe('.ping', function () {

0 commit comments

Comments
 (0)