aboutsummaryrefslogtreecommitdiffstats
path: root/modules/graceful/net_unix.go
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-11-15 22:02:46 +0800
committerGitHub <noreply@github.com>2023-11-15 22:02:46 +0800
commit79394b340d227182f94bae48cb08a091c78f2ea2 (patch)
tree48b1c224e95d24b1515b0a80c138b2caf53759cc /modules/graceful/net_unix.go
parentf65977df3a65e193995c0bdf7069553fd5867fe2 (diff)
downloadgitea-79394b340d227182f94bae48cb08a091c78f2ea2.tar.gz
gitea-79394b340d227182f94bae48cb08a091c78f2ea2.zip
Improve graceful manager code/comment (#28063)
The graceful manager has some bugs (#27643, #28062). This is a preparation for further fixes.
Diffstat (limited to 'modules/graceful/net_unix.go')
-rw-r--r--modules/graceful/net_unix.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/modules/graceful/net_unix.go b/modules/graceful/net_unix.go
index f5af1e3937..4f8c036a69 100644
--- a/modules/graceful/net_unix.go
+++ b/modules/graceful/net_unix.go
@@ -150,12 +150,8 @@ func CloseProvidedListeners() error {
return returnableError
}
-// DefaultGetListener obtains a listener for the local network address. The network must be
-// a stream-oriented network: "tcp", "tcp4", "tcp6", "unix" or "unixpacket". It
-// returns an provided net.Listener for the matching network and address, or
-// creates a new one using net.Listen. This function can be replaced by changing the
-// GetListener variable at the top of this file, for example to listen on an onion service using
-// github.com/cretz/bine
+// DefaultGetListener obtains a listener for the stream-oriented local network address:
+// "tcp", "tcp4", "tcp6", "unix" or "unixpacket".
func DefaultGetListener(network, address string) (net.Listener, error) {
// Add a deferral to say that we've tried to grab a listener
defer GetManager().InformCleanup()