This pull requests creates a trackable request object (ClientRequest). Inflight requests (that have not had their callback called) are placed into requestsById in the Client object. There is a background timer (wedgedTimer) that periodically scans for "wedged requests" and cancels the request by preemptively invoking its callback. A wedged requests is canceled if it has been inflight for greater than wedgedRequestTimeout.
Internally, ClientRequest maintains a "state machine" at each step of the TChannel-send process. When a ClientRequest is canceled, its callback will be invoked by Client. The ClientRequest also makes sure that a callback isn't called multiple times by nullifying the callback after its first invocation.
This pull requests creates a trackable request object (
ClientRequest
). Inflight requests (that have not had their callback called) are placed intorequestsById
in theClient
object. There is a background timer (wedgedTimer
) that periodically scans for "wedged requests" and cancels the request by preemptively invoking its callback. A wedged requests is canceled if it has been inflight for greater thanwedgedRequestTimeout
.Internally,
ClientRequest
maintains a "state machine" at each step of the TChannel-send process. When aClientRequest
is canceled, its callback will be invoked byClient
. TheClientRequest
also makes sure that a callback isn't called multiple times by nullifying the callback after its first invocation.@uber/ringpop