Disable keep alive by default as latest nim-waku release does not

support ping protocol.
This commit is contained in:
Franck Royer 2021-07-02 16:08:29 +10:00
parent 707979bf4c
commit aaf3b1867e
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
2 changed files with 2 additions and 1 deletions

View File

@ -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`.

View File

@ -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) => {