diff options
Diffstat (limited to 'common/PubnubCoreAsync.py')
| -rw-r--r-- | common/PubnubCoreAsync.py | 13 | 
1 files changed, 6 insertions, 7 deletions
| diff --git a/common/PubnubCoreAsync.py b/common/PubnubCoreAsync.py index 5b8d130..8150bde 100644 --- a/common/PubnubCoreAsync.py +++ b/common/PubnubCoreAsync.py @@ -6,7 +6,7 @@  ## http://www.pubnub.com/  ## ----------------------------------- -## PubNub 3.3.2 Real-time Push Cloud API +## PubNub 3.3.4 Real-time Push Cloud API  ## -----------------------------------  import sys  import json @@ -142,16 +142,15 @@ class PubnubCoreAsync(PubnubBase):                  return              def sub_callback(response): -                print response -                response = json.loads(response) +                if not self.subscriptions[channel]['first'] : +                    self.subscriptions[channel]['first'] = True +                    connectcb() +                  ## STOP CONNECTION?                  if not self.subscriptions[channel]['connected']:                      return -                ## CONNECTED CALLBACK -                if not self.subscriptions[channel]['first'] : -                    self.subscriptions[channel]['first'] = True -                    connectcb() +                  ## PROBLEM?                  if not response: | 
