aboutsummaryrefslogtreecommitdiffstats
path: root/common/PubnubCoreAsync.py
diff options
context:
space:
mode:
Diffstat (limited to 'common/PubnubCoreAsync.py')
-rw-r--r--common/PubnubCoreAsync.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/common/PubnubCoreAsync.py b/common/PubnubCoreAsync.py
index 9dcad4b..5b8d130 100644
--- a/common/PubnubCoreAsync.py
+++ b/common/PubnubCoreAsync.py
@@ -188,3 +188,12 @@ class PubnubCoreAsync(PubnubBase):
## BEGIN SUBSCRIPTION (LISTEN FOR MESSAGES)
_subscribe()
+ def unsubscribe( self, args ):
+ channel = str(args['channel'])
+ if not (channel in self.subscriptions):
+ return False
+
+ ## DISCONNECT
+ self.subscriptions[channel]['connected'] = 0
+ self.subscriptions[channel]['timetoken'] = 0
+ self.subscriptions[channel]['first'] = False