Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: send data during graceful close. (#73)
When a stream is closed gracefully, it's status goes from `'open'` to `'closing'` then to either `'closed'`, `'aborted'` or `'reset'`. While it's `'closing'` we should still try to send any queued data, this can be aborted by calling `.abort` on the stream or by the signal passed to `.close` firing the `'abort'` event. This change makes the tests added in libp2p/js-libp2p#2398 pass.
- Loading branch information