Repository navigation
Commit 5382b88
fix: stop aiohttp Socket Mode connect() retrying forever after close (#1913)
SocketModeClient.connect() used `while True` and its retry handler never
checked self.closed, so once close() closed the aiohttp ClientSession the
loop spun forever on `RuntimeError: Session is closed` (observed as 270k+
errors over 46 days in production). Make connect() respect self.closed like
its sibling loops (monitor_current_session, receive_messages) already do:
guard the loop with `while not self.closed` and return from the retry
handler once shutdown has begun.
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>1 parent 9d1d6b9 commit 5382b88
2 files changed
Lines changed: 19 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
349 | 349 | | |
350 | 350 | | |
351 | 351 | | |
352 | | - | |
| 352 | + | |
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
| |||
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
408 | 412 | | |
409 | 413 | | |
410 | 414 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
34 | 48 | | |
35 | 49 | | |
36 | 50 | | |
| |||
0 commit comments