From 493e29a108255eb3ae3166dc920f40e2f4e5c4c4 Mon Sep 17 00:00:00 2001 From: Devendra Date: Thu, 24 Apr 2014 00:16:57 +0530 Subject: adding single file for all platforms --- python-twisted/Pubnub.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'python-twisted/Pubnub.py') diff --git a/python-twisted/Pubnub.py b/python-twisted/Pubnub.py index 94d2624..efbbfd9 100644 --- a/python-twisted/Pubnub.py +++ b/python-twisted/Pubnub.py @@ -868,10 +868,9 @@ from twisted.python.compat import ( pnconn_pool = HTTPConnectionPool(reactor, persistent=True) pnconn_pool.maxPersistentPerHost = 100000 -pnconn_pool.cachedConnectionTimeout = 310 +pnconn_pool.cachedConnectionTimeout = 15 pnconn_pool.retryAutomatically = True - class Pubnub(PubnubCoreAsync): def start(self): @@ -937,11 +936,11 @@ class Pubnub(PubnubCoreAsync): def received(response): if not isinstance(response, twisted.web._newclient.Response): - _invoke(error, {"message": "Not Found"}) + _invoke(error, {"message" : "Not Found"}) return finished = Deferred() - if response.code in [401, 403]: + if response.code in [401,403]: response.deliverBody(PubNubPamResponse(finished)) else: response.deliverBody(PubNubResponse(finished)) -- cgit v1.2.3