proto: Make DataWriter::close actually do something.
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).