aboutsummaryrefslogtreecommitdiffstats
path: root/slack
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2024-02-03 12:05:20 +0100
committerTrygve Aaberge <trygveaa@gmail.com>2024-02-18 12:57:00 +0100
commite4602df81ec1b304fa7b2a6dfbf2a99e1e0c9273 (patch)
tree5f16159a5f59d1700fe4a42e95ee9e3f06f3fa66 /slack
parent7639dcb4995b13c2756f9d59e0a67e22cba57a38 (diff)
downloadwee-slack-e4602df81ec1b304fa7b2a6dfbf2a99e1e0c9273.tar.gz
Unset _connect_task after cancelling it
If _connect_task remains set, the connect command won't allow you to connect again because it thinks it's still connecting. This caused a problem where if you disconnect while connecting (or after connecting has crashed), it wasn't possible to connect again afterwards.
Diffstat (limited to 'slack')
-rw-r--r--slack/slack_workspace.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/slack/slack_workspace.py b/slack/slack_workspace.py
index 145a008..e869de7 100644
--- a/slack/slack_workspace.py
+++ b/slack/slack_workspace.py
@@ -637,6 +637,7 @@ class SlackWorkspace:
if self._connect_task:
self._connect_task.cancel()
+ self._connect_task = None
if self._hook_ws_fd:
weechat.unhook(self._hook_ws_fd)