From 6616acbec40ac039b7bdabf7e8b3581e68c0b2cb Mon Sep 17 00:00:00 2001 From: Devendra Date: Fri, 12 Jul 2013 10:14:21 +0530 Subject: adding common test from tornado and twisted --- common/PubnubCoreAsync.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'common/PubnubCoreAsync.py') 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: -- cgit v1.2.3