feat(SocketModeReceiver): expose Socket Mode timeout and reconnect options#2786
Merged
vegeris merged 1 commit intoslackapi:mainfrom Feb 12, 2026
Merged
Conversation
…tions SocketModeClient accepts clientPingTimeout, serverPingTimeout, pingPongLoggingEnabled, and autoReconnectEnabled, but SocketModeReceiver does not pass these through, forcing users to accept hardcoded defaults. This is problematic because Slack's servers frequently take >5000ms to respond to pings (see slackapi#2496), causing unnecessary disconnections with the default 5000ms clientPingTimeout. Changes: - Add clientPingTimeout, serverPingTimeout, pingPongLoggingEnabled, and autoReconnectEnabled to SocketModeReceiverOptions interface - Pass these options through to the SocketModeClient constructor - Add tests verifying option passthrough and backward compatibility Fixes slackapi#2496
|
Thanks for the contribution! Before we can merge this, we need @shivasymbl to sign the Salesforce Inc. Contributor License Agreement. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2786 +/- ##
==========================================
+ Coverage 93.44% 93.45% +0.01%
==========================================
Files 37 37
Lines 7677 7689 +12
Branches 669 669
==========================================
+ Hits 7174 7186 +12
Misses 498 498
Partials 5 5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
|
Thank you for identifying and fixing this! We just need you to sign the Contributor License Agreement to proceed :) |
Contributor
Author
|
I actually did but not sure why it doesn't update here |
Contributor
Author
vegeris
approved these changes
Feb 12, 2026
Contributor
|
I'm going to close and re-open this PR to trigger the CLA check to run again 😅 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
SocketModeClient(from@slack/socket-mode) acceptsclientPingTimeout,serverPingTimeout,pingPongLoggingEnabled, andautoReconnectEnabledoptions, butSocketModeReceiverdoes not pass these through — forcing users to accept hardcoded defaults.This is problematic because Slack's WebSocket servers frequently take >5000ms to respond to pings (see #2496), causing unnecessary disconnections with the default 5000ms
clientPingTimeout. Users have no way to increase the timeout without bypassingSocketModeReceiverentirely.Changes
clientPingTimeout,serverPingTimeout,pingPongLoggingEnabled, andautoReconnectEnabledas optional properties onSocketModeReceiverOptionsSocketModeClientconstructorundefined, preserving existingSocketModeClientdefaults (fully backward compatible)Usage
Test plan
undefineddefaults when options are omittedFixes #2496
Category
@slack/bolt(npm package)