minesweeper/src
Gordon Goldbach b15a32037f Add websocket reconnection and re-authentication
Add auto reconnection and re-authentication logic to `wsClient`.

* **WebSocket Connection and Reconnection:**
  - Modify `createWSClient` to include reconnection logic.
  - Add `connect` function to handle WebSocket connection and reconnection attempts.
  - Set `reconnectAttempts` and `maxReconnectAttempts` to manage reconnection attempts.
  - Implement exponential backoff for reconnection attempts.
  - Log error when maximum reconnection attempts are reached.

* **Authentication:**
  - Add logic to re-authenticate using a token stored in `localStorage` upon WebSocket connection.
  - Set `isAuthenticated` flag based on re-authentication success.
  - Log error if re-authentication fails.

* **Error Handling:**
  - Add `onerror` event handler to log WebSocket errors and close the connection.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/MasterGordon/minesweeper/tree/v2?shareId=XXXX-XXXX-XXXX-XXXX).
2024-10-17 20:02:26 +02:00
..
assets updated themes, added gem gain, added feed 2024-10-13 21:23:31 +02:00
components added bouncy image 2024-10-17 19:58:10 +02:00
images wip 2024-09-24 01:27:07 +02:00
lib first layout draft 2024-09-23 00:58:36 +02:00
sound first commit 2024-09-14 20:30:32 +02:00
themes updated math 2024-10-16 00:06:12 +02:00
views added bouncy image 2024-10-17 19:58:10 +02:00
Shell.tsx added cases 2024-10-15 21:06:36 +02:00
atoms.ts added cases 2024-10-15 21:06:36 +02:00
hooks.ts updated math 2024-10-16 00:06:12 +02:00
index.css added cases 2024-10-15 21:06:36 +02:00
main.tsx added store route 2024-10-13 23:40:26 +02:00
queryClient.ts added reveal and create game 2024-09-28 03:17:36 +02:00
vite-env.d.ts updated math 2024-10-16 00:06:12 +02:00
wsClient.ts Add websocket reconnection and re-authentication 2024-10-17 20:02:26 +02:00