-
Notifications
You must be signed in to change notification settings - Fork 8k
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
Stop useless panicking in context and render #2150
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2150 +/- ##
=======================================
Coverage 98.63% 98.63%
=======================================
Files 42 42
Lines 3140 3141 +1
=======================================
+ Hits 3097 3098 +1
Misses 29 29
Partials 14 14
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
This processing method is very good. In 2019, I found that there was a problem with the panic processing here, which often led to the online service CPU full, abnormal service, and online failure. I also mentioned issue to gin in 2019, but it hasn't been solved. Now from your submission, it's really a great way to deal with it. I support this mode. Thank you very much! |
Is there any update of this PR? |
Can we merge this PR ? |
@mayankvaid88 - I hope you are asking can we merge the PR? :) |
Yeah. My bad :) |
Hello! Thanks to all for paying attention to this PR. @appleboy, @thinkerou could you merge this into the main branch, please? UPD: Fixed unit tests and merged upstream branch into forked. |
d0b7ad2
@appleboy @thinkerou approve the merge request please. |
@appleboy please review the pull request, thanks! |
1 similar comment
@appleboy please review the pull request, thanks! |
People, do we really need this approval from @appleboy? |
Thanks all guys. We will release v1.9 version asap. |
When user resets connection to the server, the go's http returns "broken pipe -> write tcp...".
There is no needed to panicking because it's common case.
Instead of this I suggest to catch any errors, excepting broken pipe (syscall.EPIPE error), in server-side initialised logger.
This will improve overall performance of gin and will very helpful to log any other render errors to log.