-
Hi, I've noticed an issue with WebSocket makeHearthbeatWS method: At first connection everything work fine: ping are sent, pong are received and the client try to reconnect on connection lost After reconnection ping messages stop from being send to the server, neither pong are received (checked dev console, server console and even with "evil" msg.log on event listener) Everything restart working fine after any message is received (even if sent from another client) It's intended to work like this or I'm missing something in my code? Next the code I've used: import {
createReconnectingWS,
createWSState,
makeHeartbeatWS
} from "@solid-primitives/websocket";
const socket = makeHeartbeatWS(
createReconnectingWS(`ws://localhost:3000/v1/ws/chat`, undefined, {delay: 10000}),
{message: "ping", interval: 5000, wait: 7500},
); |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I found the error. I only do the setup once, but do not repeat it on reconnect. Thank you for your issue, I will prepare a fix within the next days. |
Beta Was this translation helpful? Give feedback.
I found the error. I only do the setup once, but do not repeat it on reconnect. Thank you for your issue, I will prepare a fix within the next days.