Commit 954dc9bc authored by Stratos Psomadakis's avatar Stratos Psomadakis
Browse files

Fix deref before None check in http pool

parent 946451e1
......@@ -37,7 +37,7 @@ from select import select
from httplib import (
HTTPConnection as http_class,
HTTPSConnection as https_class,
from new import instancemethod
......@@ -106,10 +106,10 @@ class HTTPConnectionPool(ObjectPool):
# The association is broken by put_http_connection(), to prevent
# a connection object from being returned to the pool twice,
# on duplicate invocations of conn.close().
if not conn._pool:
conn._pool = self
if conn is None:
return False
if not conn._pool:
conn._pool = self
sock = conn.sock
if sock is None:
return True
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment