def reset(self):
"""Reset the state of the transport engine. Do this
before performing another type of request."""
for c in self.__chandles:
if c not in self.__freehandles:
try:
self.__mhandle.remove_handle(c)
except pycurl.error:
# If cleanup is interrupted, it's
# possible that a handle was removed but
# not placed in freelist. In that case,
# finish cleanup and appened to
# freehandles.
pass
self.__teardown_handle(c)
self.__active_handles = 0
self.__freehandles = self.__chandles[:]
self.__req_q = deque()
self.__failures = []
self.__success = []
self.__orphans = set()
评论列表
文章目录