Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Race condition was between `valChan` and `completeChan`. When a response comes back from the server - the following two callbacks are invoked back-to-back: https://www.internalfb.com/code/fbsource/[954f75c300e6]/fbcode/third-party-go/vendor/github.com/jjeffcaii/reactor-go/mono/processor.go?lines=177-178 They both signal on channels (`valChan` and `completeChan` respectively). However, there is no guarantee which channel will be received on first. As a result - it was possible for the `completeChan` to be received on first and `valChan` to never be received on: https://www.internalfb.com/code/fbsource/[954f75c300e6]/fbcode/thrift/lib/go/thrift/rocket_rsocket_client_block.go?lines=85-87 ....As a result of that - occasionally (very rarely - as with most race conditions) - we would get a `nil` payload back, which would manifest as a `EOF` error for Rocket clients. The changes below ensure that by the time `completeChan` is received on - the payload has already been stored. Reviewed By: podtserkovskiy Differential Revision: D67217712 fbshipit-source-id: 1d1726344a1a2eb50d8167030d3bb77d8cad37f0
- Loading branch information