Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1379 websocket-client socket mode client doesn't handle reconnects properly #1380

Merged
merged 2 commits into from
Jun 1, 2023

Conversation

seratch
Copy link
Member

@seratch seratch commented Jun 1, 2023

Summary

This pull request resolves #1379

The _monitor_current_session method in the same class already checks the existence of the sock property. So, having the same logic should be consistent and safe enough.

Category (place an x in each of the [ ])

  • slack_sdk.web.WebClient (sync/async) (Web API client)
  • slack_sdk.webhook.WebhookClient (sync/async) (Incoming Webhook, response_url sender)
  • slack_sdk.socket_mode (Socket Mode client)
  • slack_sdk.signature (Request Signature Verifier)
  • slack_sdk.oauth (OAuth Flow Utilities)
  • slack_sdk.models (UI component builders)
  • slack_sdk.scim (SCIM API client)
  • slack_sdk.audit_logs (Audit Logs API client)
  • slack_sdk.rtm_v2 (RTM client)
  • /docs-src (Documents, have you run ./scripts/docs.sh?)
  • /docs-src-v2 (Documents, have you run ./scripts/docs-v2.sh?)
  • /tutorial (PythOnBoardingBot tutorial)
  • tests/integration_tests (Automated tests for this library)

Requirements (place an x in each [ ])

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've run python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.sh after making the changes.

@seratch seratch added bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented Version: 3x socket-mode labels Jun 1, 2023
@seratch seratch added this to the 3.22.0 milestone Jun 1, 2023
@seratch seratch self-assigned this Jun 1, 2023
@codecov
Copy link

codecov bot commented Jun 1, 2023

Codecov Report

Merging #1380 (7fc2c01) into main (432ed1e) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1380   +/-   ##
=======================================
  Coverage   85.58%   85.58%           
=======================================
  Files         111      111           
  Lines       11586    11586           
=======================================
  Hits         9916     9916           
  Misses       1670     1670           
Impacted Files Coverage Δ
slack_sdk/socket_mode/websocket_client/__init__.py 84.17% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@hello-ashleyintech hello-ashleyintech self-requested a review June 1, 2023 15:37
Copy link
Contributor

@hello-ashleyintech hello-ashleyintech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

@seratch seratch merged commit 787c2a2 into slackapi:main Jun 1, 2023
@seratch seratch deleted the issue-1379-websocket-client branch June 1, 2023 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented socket-mode Version: 3x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

websocket-client socket mode client doesn't handle reconnects properly
2 participants