Closed bangert closed 7 years ago
If this is something we should do, should it not just be a part of close() instead?
Thanks for the fast review!
In our use case, we poll in intervals, and we need to guarantee, that we are finished within a certain time (ie. before the next interval starts), which is why we want to cancel outstanding requests and return immediately.
The reason to introduce a new function is to remain backwards compatible with users, who might rely on the current behavior. But i am not 100% certain how the current behavior could be used constructively...
If you don't have cancel, active request will remain active until at most the maximum timeout value in theory. In practice I've found them to be aborted only by the deadline support - which means they would linger on indefinitely. Presumably because we never call the callback, after the socket has been closed.
Thanks
This adds support for canceling active requests in the session.
Open questions:
TODO: