aboutsummaryrefslogtreecommitdiffstats
path: root/common/PubnubCoreAsync.py
diff options
context:
space:
mode:
authorDevendra2013-07-12 10:14:21 +0530
committerDevendra2013-07-12 10:14:21 +0530
commit6616acbec40ac039b7bdabf7e8b3581e68c0b2cb (patch)
tree3768b67e046aef37790c12f774838e539ac25a80 /common/PubnubCoreAsync.py
parent523802043bf1ce3616d3bac382f166e34984d5bf (diff)
downloadpubnub-python-6616acbec40ac039b7bdabf7e8b3581e68c0b2cb.tar.bz2
adding common test from tornado and twisted
Diffstat (limited to 'common/PubnubCoreAsync.py')
-rw-r--r--common/PubnubCoreAsync.py13
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: