Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore NotConnected error in poll_shutdown()
We try to write buffered data to the stream before shutting it down. This seems to be in line with the guidance from Tokio's AsyncWrite docs: > Invocation of a shutdown implies an invocation of flush. Once this method > returns `Ready` it implies that a flush successfully happened before the > shutdown happened. That is, callers don't need to call flush before > calling shutdown. They can rely that by calling shutdown any pending > buffered data will be written out. We propagate errors from the write. However, if we get a `NotConnected` error during shutdown we might just as well ignore it.
- Loading branch information