-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Allow the use of alternative net.Listener implementations by downstreams #25855
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
da0ce85
allow the use of an alternate GetListener function, which can return …
eyedeekay 2fcc4b7
Merge branch 'go-gitea:main' into pluggable-listeners
eyedeekay 6431ca1
Add comments to explain how to use the GetListener variable, add a Ge…
6dcb29b
Move GetListener to server.go per @wxiaoguang's advice
f214b3d
Update modules/graceful/server.go
lunny e877743
Merge branch 'main' into pluggable-listeners
GiteaBot 13f5d4f
Merge branch 'main' into pluggable-listeners
GiteaBot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
It needs some comments about why it is done so here.
Otherwise it looks good to me.
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.
Primary reason for it being there is because that is where the GetListener function was before and I was trying to avoid moving anything or otherwise avoid making changes that would be cosmetic or unnecessary. Putting it there kept the whole set of changes to just the 2 lines and makes it very clear that all I did was make a function replaceable. I could move the GetListener variable declaration to the top of the file and it would have the same effect obviously, and if that's preferred I will.
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.
I moved the GetListener to the top of the file with the other vars, commented both GetListener and DefaultGetListener to explain their usage, and added a GetListener/DefaultGetListener pair to net_windows.go