Closed gamache closed 5 years ago
Yeah, it's a bit confusing between the Mint-supplied request_ref
(used by Mojito.ConnServer
to disentangle multiplexed requests) and the Mojito response_ref
(used by Mojito.Pool.Single
to identify the proper response for the current request). Similar concepts, similar names.
Still, don't let my confusion stall this bugfix
This PR adds a unique reference to every
:mojito_response
message sent, so that the receiver can match on the reference to ensure the response is associated with the current request and not a request that timed out in the past. (EDIT: this is handled internally and does not require end user changes.)It was also a convenient time to do some refactoring to use
%Mojito.Request{}
structs more consistently across internal functions, so I did that too. The external surface of Mojito did not change.Fixes #32.