Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix gnet.Conn not compatible with net.Conn on method Close #348

Merged
merged 1 commit into from
Mar 26, 2022

Conversation

0-haha
Copy link
Contributor

@0-haha 0-haha commented Mar 25, 2022

net.Conn 的Close() method的function signature是Close() error, 而gnet.Conn的Close() method的function signature是Close(callback AsyncCallback) error
现在把老的函数重命名成CloseWithCallback(callback AsyncCallback)

name: Fix gnet.Conn not compatible with net.Conn on method Close
about: Propose changes to the code
title: ''
labels: ''
assignees: ''

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

Yes

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

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

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

4. Checklist

  • I have squashed all insignificant commits.
  • I have commented my code for explaining package types, values, functions, and non-obvious lines.
  • I have written unit tests and verified that all tests passes (if needed).
  • I have documented feature info on the README (only when this PR is adding a new feature).
  • (optional) I am willing to help maintain this change if there are issues with it later.

…e func() error and change Close(AsyncCallback) to CloseWithCallback(AsyncCallback)
@codecov
Copy link

codecov bot commented Mar 26, 2022

Codecov Report

Merging #348 (9654480) into dev (86b3499) will decrease coverage by 0.19%.
The diff coverage is 71.42%.

@@            Coverage Diff             @@
##              dev     #348      +/-   ##
==========================================
- Coverage   72.50%   72.31%   -0.20%     
==========================================
  Files          13       13              
  Lines        1371     1376       +5     
==========================================
+ Hits          994      995       +1     
- Misses        308      313       +5     
+ Partials       69       68       -1     
Flag Coverage Δ
unittests 72.31% <71.42%> (-0.20%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
client.go 50.33% <0.00%> (ø)
gnet.go 74.56% <ø> (ø)
connection.go 69.73% <83.33%> (-0.84%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 86b3499...9654480. Read the comment docs.

@panjf2000 panjf2000 merged commit 4195bd1 into panjf2000:dev Mar 26, 2022
@panjf2000
Copy link
Owner

Thanks

0-haha added a commit to 0-haha/gnet that referenced this pull request Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants