-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
chore: add debugging log when error occurs in Accept() #222
Conversation
Sorry, I don't see any value from this code change, what's the point of this PR? |
I got an |
If you're just doing this only for debugging purposes, I'd suggest you add a debug log under this: Line 39 in b4a9840
|
I'm afraid this Lines 34 to 40 in b4a9840
|
Make senses, then could you take a look across |
You mean adding logs instead of wrap errors? sure, that's better. |
I just refactored the logging logic in 8837a92, please rebase your branch on it. |
Done. |
Codecov Report
@@ Coverage Diff @@
## master #222 +/- ##
==========================================
+ Coverage 83.83% 85.67% +1.83%
==========================================
Files 18 18
Lines 1231 1410 +179
==========================================
+ Hits 1032 1208 +176
- Misses 148 151 +3
Partials 51 51
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks~
name: Pull request
about: wrap errors description
title: 'wrap errors'
labels: ''
assignees: ''
1. Are you opening this pull request for bug-fixs, optimizations or new feature?
optimizations
2. Please describe how these code changes achieve your intention.
acceptNewConnection
sometimes return a simpleErrAcceptSocket
error with no exactly description. It will cost so much time to figure out where the problem is. For example, if the connection number achieved system's fd limit, I just got an error message likeMain reactor is exiting due to error: accept a new connection error
. After errors wrapped, the error message is likeMain reactor is exiting due to error: accept a new connection error: too many open files
.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