Commit 22db17bb authored by Denis Bilenko's avatar Denis Bilenko

fix evhttp not to leak http_request instance by adding sys.exc_clear() in the exception handler

parent abc73841
......@@ -465,6 +465,8 @@ cdef void _http_cb_handler(evhttp_request* request, void *arg) with gil:
sys.stderr.write('Failed to handle request: %s\n\n' % (req, ))
except:
traceback.print_exc()
# without clearing exc_info a reference to the request is somehow leaked
sys.exc_clear()
cdef void _http_closecb_handler(evhttp_connection* connection, void *arg) with gil:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment