Skip to content

Commit

Permalink
Fix aiohttp SocketModeClient.is_connected AttributeError in detailed …
Browse files Browse the repository at this point in the history
…logging

In a new aiohttp SocketModeClient, when self.current_session is None, calling is_connected and going into the detailed logging section will attempt to access self.current_session.closed and lead to an AttributeError
  • Loading branch information
cxong authored and seratch committed Jun 5, 2024
1 parent 352cb23 commit 089afec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion slack_sdk/socket_mode/aiohttp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ async def is_connected(self) -> bool:
f"session_id: {session_id}, "
f"closed: {self.closed}, "
f"stale: {self.stale}, "
f"current_session.closed: {self.current_session.closed}, "
f"current_session.closed: {self.current_session and self.current_session.closed}, "
f"is_ping_pong_failing: {is_ping_pong_failing}"
")"
)
Expand Down

0 comments on commit 089afec

Please sign in to comment.