diff --git a/packages/sdk/src/protocols/filter/subscription_manager.ts b/packages/sdk/src/protocols/filter/subscription_manager.ts index 51b32e1e9c..7087ee8e84 100644 --- a/packages/sdk/src/protocols/filter/subscription_manager.ts +++ b/packages/sdk/src/protocols/filter/subscription_manager.ts @@ -242,18 +242,21 @@ export class SubscriptionManager implements ISubscription { let result; try { result = await this.protocol.ping(peer); - return result; } catch (error) { - return { + result = { success: null, failure: { peerId, error: ProtocolError.GENERIC_FAIL } }; - } finally { - void this.reliabilityMonitor.handlePingResult(peerId, result); } + + log.info( + `Received result from filter ping peerId:${peerId.toString()}\tsuccess:${result.success?.toString()}\tfailure:${result.failure?.error}` + ); + await this.reliabilityMonitor.handlePingResult(peerId, result); + return result; } private startSubscriptionsMaintenance(timeout: number): void { diff --git a/packages/sdk/src/reliability_monitor/receiver.ts b/packages/sdk/src/reliability_monitor/receiver.ts index 7876080bbb..ff48b6a06f 100644 --- a/packages/sdk/src/reliability_monitor/receiver.ts +++ b/packages/sdk/src/reliability_monitor/receiver.ts @@ -88,6 +88,9 @@ export class ReceiverReliabilityMonitor { if (failures >= this.maxPingFailures) { try { + log.info( + `Attempting to renew ${peerId.toString()} due to ping failures.` + ); await this.renewAndSubscribePeer(peerId); this.peerFailures.delete(peerId.toString()); } catch (error) {