Commit 732f9e4
committed
fix(ws-hook): reset reconnectAttempts for new sessions and manual resets
- Reset reconnectAttempts.current = 0 when starting fresh connection in useEffect
- Reset reconnectAttempts.current = 0 in reset() callback
- Ensures future retries aren't blocked by stale counter from previous sessions1 parent 4e85b7f commit 732f9e4
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
| 234 | + | |
| 235 | + | |
234 | 236 | | |
235 | 237 | | |
236 | 238 | | |
| |||
249 | 251 | | |
250 | 252 | | |
251 | 253 | | |
| 254 | + | |
252 | 255 | | |
253 | 256 | | |
254 | 257 | | |
| |||
0 commit comments