Conversation
🦋 Changeset detectedLatest commit: f1b9280 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2565 +/- ##
==========================================
- Coverage 87.41% 87.38% -0.04%
==========================================
Files 62 62
Lines 10251 10256 +5
Branches 415 415
==========================================
+ Hits 8961 8962 +1
- Misses 1269 1273 +4
Partials 21 21
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
WilliamBergamin
left a comment
There was a problem hiding this comment.
Nice work 💯
Left once comment on the tests but it should be none blocking
| } else if (this.websocket.readyState === WebSocket.CLOSING) { | ||
| // A close frame was already sent but the peer hasn't responded. Force-terminate rather than | ||
| // waiting for the ws library's closeTimeout (~30s) while the ping monitor logs repeated warnings. | ||
| this.logger.debug('Terminating WebSocket (close frame sent but no response, force-terminating).'); |
|
@WilliamBergamin I appreciate the review and suggestions toward this change! Let's merge this now to release upcoming 🎁 |
Summary
This PR terminates closing connections earlier if normal close responses fail for openclaw/openclaw#72808 🦞
We hope to attempt a reconnection sooner because these reconnection issues can occur for various reasons, including during a server swap on the backend:
📚 https://docs.slack.dev/apis/events-api/using-socket-mode#disconnect
Preview
Before
before.mov
After
after.mov
Reviewers
Please build this branch and test with a Bolt app ⚡
After connecting with Socket Mode, turn internet off, grab a glass of water, and turn the internet back on. A reconnection should succeed!
Notes
num_connectionsreturns as "2" instead of "1" after reconnections. I believe this can happen both before and after these changes, but soon resolves after Slack decides the connection is idle 🔬Requirements