diff options
| author | Devendra | 2013-10-16 10:06:05 +0530 | 
|---|---|---|
| committer | Devendra | 2013-10-16 10:06:05 +0530 | 
| commit | 61c875e39ba42cffb8a834afa6fde7075743735b (patch) | |
| tree | 605096de6fffe0e8edfc8c0bfe1fbc7402195a80 | |
| parent | 56a6a2cf5e798f412621a2ed4a6d2cb5356ee156 (diff) | |
| download | pubnub-python-TR-98.tar.bz2 | |
adding fix for urllib leak as suggested by JayTR-98
| -rw-r--r-- | python/Pubnub.py | 1 | ||||
| -rw-r--r-- | python/unassembled/Platform.py | 1 | 
2 files changed, 2 insertions, 0 deletions
| diff --git a/python/Pubnub.py b/python/Pubnub.py index 680e64c..0e0371d 100644 --- a/python/Pubnub.py +++ b/python/Pubnub.py @@ -635,6 +635,7 @@ class Pubnub(PubnubCore):              try: usock = urllib2.urlopen( url, None, 310 )              except TypeError: usock = urllib2.urlopen( url, None )              response = usock.read() +            usock.fp._sock.recv = None              usock.close()              resp_json = json.loads(response)          except: diff --git a/python/unassembled/Platform.py b/python/unassembled/Platform.py index f598a98..a36b7f8 100644 --- a/python/unassembled/Platform.py +++ b/python/unassembled/Platform.py @@ -29,6 +29,7 @@ class Pubnub(PubnubCore):              try: usock = urllib2.urlopen( url, None, 310 )              except TypeError: usock = urllib2.urlopen( url, None )              response = usock.read() +            usock.fp._sock.recv = None              usock.close()              resp_json = json.loads(response)          except: | 
