Skip to content

Commit

Permalink
Fix #1462 websocket_client-based SocketModeClient does not reconnect …
Browse files Browse the repository at this point in the history
…after a DNS outage (#1466)
  • Loading branch information
seratch authored Feb 28, 2024
1 parent fe45e0b commit cd78ab4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions slack_sdk/socket_mode/websocket_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@ def _run_current_session(self):
self.logger.info("Stopped receiving messages from a connection")
except Exception as e:
self.logger.exception(f"Failed to start or stop the current session: {e}")
# To let the monitoring job detect the connection issue, closing this session
if self.current_session is not None:
self.current_session.close()

def _monitor_current_session(self):
if self.current_app_monitor_started:
Expand Down

0 comments on commit cd78ab4

Please sign in to comment.