Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit d074e13

Browse files
committed
fix(pubsub): clear interval on error
License: MIT Signed-off-by: Alan Shaw <[email protected]>
1 parent f5ccada commit d074e13

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

js/src/pubsub.js

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ function waitForPeers (ipfs, topic, peersToWait, callback) {
2121
const i = setInterval(() => {
2222
ipfs.pubsub.peers(topic, (err, peers) => {
2323
if (err) {
24+
clearInterval(i)
2425
return callback(err)
2526
}
2627

0 commit comments

Comments
 (0)