Skip to content

Commit

Permalink
fix: condition for ping failure
Browse files Browse the repository at this point in the history
  • Loading branch information
danisharora099 committed Sep 12, 2024
1 parent 5970e65 commit 2eddaf5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/sdk/src/protocols/filter/reliability_monitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export class ReceiverReliabilityMonitor {
const failures = (this.peerFailures.get(peerId.toString()) || 0) + 1;
this.peerFailures.set(peerId.toString(), failures);

if (failures > this.maxPingFailures) {
if (failures >= this.maxPingFailures) {
try {
await this.renewAndSubscribePeer(peerId);
this.peerFailures.delete(peerId.toString());
Expand Down

0 comments on commit 2eddaf5

Please sign in to comment.