mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Improve graceful manager code/comment (#28063)
The graceful manager has some bugs (#27643, #28062). This is a preparation for further fixes.
This commit is contained in:
		@@ -10,9 +10,7 @@ package graceful
 | 
			
		||||
import "net"
 | 
			
		||||
 | 
			
		||||
// DefaultGetListener obtains a listener for the local network address.
 | 
			
		||||
// On windows this is basically just a shim around 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
 | 
			
		||||
// On windows this is basically just a shim around net.Listen.
 | 
			
		||||
func DefaultGetListener(network, address string) (net.Listener, error) {
 | 
			
		||||
	// Add a deferral to say that we've tried to grab a listener
 | 
			
		||||
	defer GetManager().InformCleanup()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user