aboutsummaryrefslogtreecommitdiffstats
path: root/python-twisted/Pubnub.py
diff options
context:
space:
mode:
Diffstat (limited to 'python-twisted/Pubnub.py')
-rw-r--r--python-twisted/Pubnub.py7
1 files changed, 3 insertions, 4 deletions
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))