Files
Leo BlöcherandGitHub 8f1df93ba1 Fix dropped responses when DNS stream encounters EOF (#568)
* Add regression test for immediate EOF on stream

* Fix dropped responses when DNS stream encounters EOF

The `stream::Transport` loop did not account for responses that had been
added to the reply channel prior to `reader_fut` returning. If a server
sent a response and immediately closed the stream afterwards, that
response was lost. I fixed the bug by adding an explicit check for any
remaining items from `reply_receiver` in the `reader_fut` select branch.

Additionally, the `Transport::error` function did not await the futures
returned by `ReplySender::send`. This meant the errors were never sent
and instead the channel closed without any message. I fixed that by
making `Transort::error` an async fn.

The PR additionally contains a regression test. Running it without the
fix fails, but with the fixes it passes. I did not use stelline for this
test as it requires a very specific order of IO events on the
connection.
2025-09-15 11:07:20 +02:00
..
2025-06-25 14:23:28 +00:00
2025-06-25 14:23:28 +00:00