vacp2p / nim-libp2p

libp2p implementation in Nim
https://vacp2p.github.io/nim-libp2p/docs/
MIT License
242 stars 52 forks source link

don't forget closing the stream when final `{Fin}` fails in yamux #1043

Closed etan-status closed 4 months ago

etan-status commented 4 months ago

When there is an error during the final graceful {Fin}, we currently don't call channel.actuallyClose(). Fix that by ignoring such errors.

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 82.82%. Comparing base (6c87348) to head (c8febfd).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/status-im/nim-libp2p/pull/1043/graphs/tree.svg?width=650&height=150&src=pr&token=UR5JRQ249W&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im)](https://app.codecov.io/gh/status-im/nim-libp2p/pull/1043?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im) ```diff @@ Coverage Diff @@ ## unstable #1043 +/- ## ============================================ + Coverage 82.77% 82.82% +0.05% ============================================ Files 91 91 Lines 15604 15608 +4 ============================================ + Hits 12916 12928 +12 + Misses 2688 2680 -8 ``` | [Files](https://app.codecov.io/gh/status-im/nim-libp2p/pull/1043?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im) | Coverage Δ | | |---|---|---| | [libp2p/muxers/yamux/yamux.nim](https://app.codecov.io/gh/status-im/nim-libp2p/pull/1043?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im#diff-bGlicDJwL211eGVycy95YW11eC95YW11eC5uaW0=) | `88.47% <100.00%> (+0.12%)` | :arrow_up: | ... and [4 files with indirect coverage changes](https://app.codecov.io/gh/status-im/nim-libp2p/pull/1043/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=status-im)