panjf2000 / gnet

🚀 gnet is a high-performance, lightweight, non-blocking, event-driven networking framework written in pure Go.
https://gnet.host
Apache License 2.0
9.69k stars 1.04k forks source link

bug: fix Conn.Next and Conn.Peek panic On Unix #616

Closed serious-snow closed 5 months ago

serious-snow commented 5 months ago

1. Are you opening this pull request for bug-fixes, optimizations or new feature?

bug-fixes

2. Please describe how these code changes achieve your intention.

The code was modified at the suggestion of the author。

3. Please link to the relevant issues (if any).

615

4. Which documentation changes (if any) need to be made/updated because of this PR?

nothing

4. Checklist

codecov[bot] commented 5 months ago

Codecov Report

Attention: Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 79.43%. Comparing base (5346527) to head (6269155).

Files Patch % Lines
connection_unix.go 25.00% 2 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #616 +/- ## ========================================== - Coverage 79.58% 79.43% -0.15% ========================================== Files 21 21 Lines 2106 2106 ========================================== - Hits 1676 1673 -3 - Misses 298 300 +2 - Partials 132 133 +1 ``` | [Flag](https://app.codecov.io/gh/panjf2000/gnet/pull/616/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Andy+Pan) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/panjf2000/gnet/pull/616/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Andy+Pan) | `79.43% <25.00%> (-0.15%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Andy+Pan#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.