Commit 174b261
Dylan Huang
Improve WebSocket connection handling
- Updated the WebSocket connection logic to prevent multiple connections by checking for both OPEN and CONNECTING states.
- This change addresses potential issues in React strict mode where multiple connection attempts could occur.1 parent fd70d4f commit 174b261
1 file changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
| |||
0 commit comments