Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(phoenix-channel): re-queue message upon send failure (#4294)
Previously, we would lose one message to the portal upon failing to send it. We now mitigate this in two ways: 1. We also check the error from `poll_ready` and don't even pop a message off from our buffer. 2. If sending still fails, we re-queue it to the front of the buffer. In certain scenarios as discovered in logs from #4058, this might have caused a loss of the "answer" message from a gateway to the client, resulting in a state mismatch where the gateway thinks the connection is established and the client times out on waiting for the answer.
- Loading branch information