diff --git a/lib/request/connect.py b/lib/request/connect.py index 1773acd46..6df954892 100644 --- a/lib/request/connect.py +++ b/lib/request/connect.py @@ -353,7 +353,8 @@ class Connect: # Explicit closing of connection object if not conf.keepAlive: try: - conn.fp._sock.close() + if hasattr(conn.fp, '_sock'): + conn.fp._sock.close() conn.close() except Exception, msg: warnMsg = "problem occured during connection closing ('%s')" % msg