mirror of
https://github.com/logos-messaging/js-waku.git
synced 2026-01-08 08:43:09 +00:00
fix: add payload to relay ping messages to avoid poor relay peer scoring
Note that this keep alive mechanism should probably be removed.
This commit is contained in:
parent
e359ab8616
commit
560c393662
@ -54,7 +54,7 @@ export class KeepAliveManager {
|
|||||||
const interval = setInterval(() => {
|
const interval = setInterval(() => {
|
||||||
log("Sending Waku Relay ping message");
|
log("Sending Waku Relay ping message");
|
||||||
relay
|
relay
|
||||||
.send(encoder, { payload: new Uint8Array() })
|
.send(encoder, { payload: new Uint8Array([1]) })
|
||||||
.catch((e) => log("Failed to send relay ping", e));
|
.catch((e) => log("Failed to send relay ping", e));
|
||||||
}, relayPeriodSecs * 1000);
|
}, relayPeriodSecs * 1000);
|
||||||
this.relayKeepAliveTimers.set(peerId, interval);
|
this.relayKeepAliveTimers.set(peerId, interval);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user