Reset context shared_ptr in AsyncTimeout::cancelTimeout()
Summary:
This seems to fix issue in the attached task.
`context_` is set in `scheduleTimeout()` and never gets reset. So when an AsyncTimeout object is held across requests by objects like `IOThreadPool0` in I/O Thread Pool used by wangle/acceptor/ConnectionManager, RequestContext object created for the last request is leaked until `IOThreadPool0` handles another request and overrides `context_`. In the issue described in attached task, unit test has single request, next request never comes in, RequestContext doesn't end until test service stops, logging feature relying on RequestContext dtor doesn't get called in time, and thus unit test fails.
Reviewed By: yfeldblum
Differential Revision:
D6402268
fbshipit-source-id:
200c6d358dfa6d7d9aa68ab05f6f1c7f4117b0ec