From 4dd39874514686e771de93a00f0d815d34811b15 Mon Sep 17 00:00:00 2001 From: steveluscher Date: Thu, 7 Apr 2022 15:42:58 -0700 Subject: [PATCH] Reset onLogs subscriptions when websocket disconnects --- web3.js/src/connection.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web3.js/src/connection.ts b/web3.js/src/connection.ts index 4897521087..43f4a8da55 100644 --- a/web3.js/src/connection.ts +++ b/web3.js/src/connection.ts @@ -4154,6 +4154,9 @@ export class Connection { Object.values(this._accountChangeSubscriptions).forEach( s => (s.subscriptionId = null), ); + Object.values(this._logsSubscriptions).forEach( + s => (s.subscriptionId = null), + ); Object.values(this._programAccountChangeSubscriptions).forEach( s => (s.subscriptionId = null), );