Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Server.handleCall: Run methods when the ctx is already canceled
...and let the method implementation check the context itself. This solves an occasional hang (observed in capnproto#318) in TestRecvCancel, which involves a method implementation that waits for its context to be canceled and then closes a channel. Without this patch, if the context is cancelled early enough for handleCall to see it, it won't run the method at all, and so the channel will never be closed, causing the test to hang on a receive on that channel.
- Loading branch information