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.7k stars 1.04k forks source link

bug: fix Conn.Next not safe (#648) #649

Closed zhongweikang closed 3 weeks ago

zhongweikang commented 3 weeks 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).

https://github.com/panjf2000/gnet/issues/648

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

nothing

4. Checklist

codecov[bot] commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 78.93%. Comparing base (2e261de) to head (8e96be7). Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
connection_unix.go 0.00% 3 Missing :warning:
connection_windows.go 0.00% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #649 +/- ## ========================================== + Coverage 78.57% 78.93% +0.35% ========================================== Files 21 21 Lines 2535 2535 ========================================== + Hits 1992 2001 +9 + Misses 417 412 -5 + Partials 126 122 -4 ``` | [Flag](https://app.codecov.io/gh/panjf2000/gnet/pull/649/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/649/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Andy+Pan) | `78.93% <0.00%> (+0.35%)` | :arrow_up: | 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.

panjf2000 commented 3 weeks ago

Thanks!