Skip to content

proto: Make DataWriter::close actually do something.

Nick Mathewson requested to merge nickm/arti:stream_close_v2 into main

Previously we had a bug where <DataWriter as AsyncWrite>::close (or shutdown in tokio-land) would not actually have any effect. It would drop the StreamTarget held by the DataWriter, but since the DataReader also held a StreamTarget, the MPSC channel would not get closed, and the circuit reactor would not realize that the stream wanted to shut down.

Now we use mpsc::Sender::close_channel to make our closes effectual.

Closes #1368 (closed).

Merge request reports