From aaf3b1867e844de9d2b2b556f57645b832a14087 Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Fri, 2 Jul 2021 16:08:29 +1000 Subject: [PATCH] Disable keep alive by default as latest nim-waku release does not support ping protocol. --- CHANGELOG.md | 1 + src/lib/waku.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e844c4308c..700e300483 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - **Breaking**: Auto select peer if none provided for store and light push protocols. - Upgrade to `libp2p@0.31.7` and `libp2p-gossipsub@0.10.0` to avoid `TextEncoder` errors in ReactJS tests. +- Disable keep alive by default as latest nim-waku release does not support ping protocol. ### Fixed - Disable `keepAlive` if set to `0`. diff --git a/src/lib/waku.ts b/src/lib/waku.ts index 093192217f..92479dc842 100644 --- a/src/lib/waku.ts +++ b/src/lib/waku.ts @@ -76,7 +76,7 @@ export class Waku { this.lightPush = lightPush; this.keepAliveTimers = {}; - const keepAlive = options.keepAlive !== undefined ? options.keepAlive : 10; + const keepAlive = options.keepAlive !== undefined ? options.keepAlive : 0; if (keepAlive !== 0) { libp2p.connectionManager.on('peer:connect', (connection: Connection) => {