[PR #26] [MERGED] fix: auto-reconnect if websocket stops sending messages #58

Closed
opened 2026-02-16 12:26:55 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/stoatchat/javascript-client-sdk/pull/26
Author: @sussycatgirl
Created: 11/13/2021
Status: Merged
Merged: 1/4/2022
Merged by: @insertish

Base: masterHead: master


📝 Commits (1)

  • b142f86 Duct tape fixed a websocket issue

📊 Changes

2 files changed (+47 additions, -8 deletions)

View changed files

📝 src/Client.ts (+14 -0)
📝 src/websocket/client.ts (+33 -8)

📄 Description

This attempts to fix an issue where the client randomly stops receiving websocket messages for no apparent reason.

When pongTimeout is set in the client config, the client awaits a Pong event every time a Ping is sent. If no Pong is received within the specified timeout window, the websocket client attempts to reconnect (Or optionally immediately exits).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/stoatchat/javascript-client-sdk/pull/26 **Author:** [@sussycatgirl](https://github.com/sussycatgirl) **Created:** 11/13/2021 **Status:** ✅ Merged **Merged:** 1/4/2022 **Merged by:** [@insertish](https://github.com/insertish) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`b142f86`](https://github.com/stoatchat/javascript-client-sdk/commit/b142f8600611dfa9135587c1054d6fecae6dbfd1) Duct tape fixed a websocket issue ### 📊 Changes **2 files changed** (+47 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `src/Client.ts` (+14 -0) 📝 `src/websocket/client.ts` (+33 -8) </details> ### 📄 Description This attempts to fix an issue where the client randomly stops receiving websocket messages for no apparent reason. When `pongTimeout` is set in the client config, the client awaits a `Pong` event every time a `Ping` is sent. If no Pong is received within the specified timeout window, the websocket client attempts to reconnect (Or optionally immediately exits). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 12:26:55 -05:00
yindo closed this issue 2026-02-16 12:26:55 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: stoatchat/javascript-client-sdk#58