Do socket shutdown() of target before close().

This commit is contained in:
Joel Martin 2011-06-26 13:26:59 -05:00
parent c659bcb79e
commit d91d89167f
2 changed files with 2 additions and 1 deletions

View File

@ -713,7 +713,7 @@ Sec-WebSocket-Accept: %s\r
try:
self.poll()
ready = select.select([lsock], [], [], 1)[0];
ready = select.select([lsock], [], [], 1)[0]
if lsock in ready:
startsock, address = lsock.accept()
else:

View File

@ -161,6 +161,7 @@ Traffic Legend:
self.do_proxy(tsock)
except:
if tsock:
tsock.shutdown(socket.SHUT_RDWR)
tsock.close()
self.vmsg("%s:%s: Target closed" %(
self.target_host, self.target_port))