def killSocket(self):
if not self.currentResponse:
return
try:
socket.fromfd(self.currentResponse.raw.fileno(), socket.AF_INET, socket.SOCK_STREAM).shutdown(socket.SHUT_RDWR)
return
except AttributeError:
pass
except Exception, e:
util.ERROR(err=e)
try:
self.currentResponse.raw._fp.fp._sock.shutdown(socket.SHUT_RDWR)
except AttributeError:
pass
except Exception, e:
util.ERROR(err=e)
评论列表
文章目录