Commit 954d9d6
committed
feat: Enhance WebSocketConnector with reconnection logic and configuration options
- Added `_currentAttempt` property to track reconnection attempts.
- Introduced `_handleConnectionFailure` method to manage reconnection logic with exponential backoff.
- Updated `WebSocketOptions` to replace `idleTimeout` with `idleTimeoutMs` and `reconnectOnFailure` with `reconnectAttempts`.
- Modified `WebSocketConnectorBase` to utilize new options and handle connection failures.
- Updated tests to reflect changes in configuration options and validate reconnection behavior.
- Ensured reconnection attempts are capped at a maximum of 10 to prevent excessive retries.1 parent fbf0c8e commit 954d9d6
File tree
20 files changed
+365
-228
lines changed- dist
- cjs
- esm
- types
- src
- tests
20 files changed
+365
-228
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
| 61 | + | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
166 | | - | |
| 165 | + | |
| 166 | + | |
167 | 167 | | |
168 | | - | |
169 | | - | |
| 168 | + | |
| 169 | + | |
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
179 | | - | |
| 178 | + | |
| 179 | + | |
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
| 185 | + | |
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
| 189 | + | |
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
210 | 217 | | |
211 | 218 | | |
212 | 219 | | |
213 | 220 | | |
214 | 221 | | |
215 | | - | |
| 222 | + | |
216 | 223 | | |
217 | 224 | | |
218 | 225 | | |
| |||
368 | 375 | | |
369 | 376 | | |
370 | 377 | | |
371 | | - | |
| 378 | + | |
372 | 379 | | |
373 | 380 | | |
374 | 381 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments