I have a piece of code that wraps a stream (cancellation safe) takes a message, processes it, makes 1 send call on a MPSC channel (where it .await's) and then returns the value to the caller. Now I traced a bug were I can see a new message is taken from the stream, but the function never returns the value.
Yet the caller is calling this function in a while loop with a tokio::select (where it awaits this call and an app shudown signal) and it doesn't produce any errors and the app isn't being shutdown.
So my only guess is that the future is somehow cancelled and the in flight message is lost in my function body while trying to call the send method.
Any insights or ways to debug/fix would be great!!