diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2023-02-03 00:00:33 +0100 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2024-02-18 11:32:53 +0100 |
commit | 7475e79d9094b0f95758fb51721308316d667cf3 (patch) | |
tree | bae8cb119eb16b4e29ffbad696222d0dd0c0e747 /slack | |
parent | a1c4b14c8f504b39cfadd78a9010c3ed6495e123 (diff) | |
download | wee-slack-7475e79d9094b0f95758fb51721308316d667cf3.tar.gz |
Return immediately from connect if connected
Diffstat (limited to 'slack')
-rw-r--r-- | slack/slack_workspace.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/slack/slack_workspace.py b/slack/slack_workspace.py index 5973c9a..aed3f18 100644 --- a/slack/slack_workspace.py +++ b/slack/slack_workspace.py @@ -185,6 +185,8 @@ class SlackWorkspace: weechat.bar_item_update("input_text") async def connect(self) -> None: + if self.is_connected: + return self._connect_task = create_task(self._connect()) await self._connect_task self._connect_task = None |