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 webhook timeout bug #15613

Merged
merged 2 commits into from Apr 25, 2021
Merged

Conversation

lunny
Copy link
Member

@lunny lunny commented Apr 25, 2021

conn.SetDeadline will set a timeout based on connection succeed but not per request. Since a connection maybe resued for multiple http requests. This will result in many timeout on webhook requests.

This PR fix the problem which also found in gitea.com

This PR also changed a similiar problem on httplib. Because it will always create a new client when request, so it will not be affected currently. But creating a new client per request is really a problem should be fixed.

@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Apr 25, 2021
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Apr 25, 2021
@lafriks lafriks merged commit 3d5bb3e into go-gitea:master Apr 25, 2021
@lunny lunny deleted the lunny/fix_webhook_deadline branch April 26, 2021 00:58
lunny added a commit to lunny/gitea that referenced this pull request Apr 26, 2021
* Also fix the potential problem in httplib
6543 pushed a commit that referenced this pull request Apr 26, 2021
* Also fix the potential problem in httplib
@6543 6543 added the backport/done All backports for this PR have been created label Apr 30, 2021
@go-gitea go-gitea locked and limited conversation to collaborators Jun 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants