mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
noticed little DoS behavior and lots of connections in netstat (best way to deal with zombie connections is to explicitly close them if not needed any more)
This commit is contained in:
parent
c4d6a367e9
commit
f2373121d0
|
@ -231,6 +231,14 @@ class Connect:
|
|||
responseHeaders = conn.info()
|
||||
page = decodePage(page, responseHeaders.get("Content-Encoding"), responseHeaders.get("Content-Type"))
|
||||
|
||||
# Explicit closing of connection object
|
||||
if not conf.keepAlive:
|
||||
try:
|
||||
conn.close()
|
||||
except Exception, msg:
|
||||
warnMsg = "problem occured during connection closing ('%s')" % msg
|
||||
logger.warn(warnMsg)
|
||||
|
||||
except urllib2.HTTPError, e:
|
||||
code = e.code
|
||||
status = e.msg
|
||||
|
|
Loading…
Reference in New Issue
Block a user