mirror of
https://github.com/minio/minio.git
synced 2025-01-11 15:03:22 -05:00
Stop attempting to close nil Listener (#4753)
This commit is contained in:
parent
28bc5899fd
commit
0aca2ab970
@ -118,6 +118,10 @@ func (srv *Server) Start() (err error) {
|
||||
|
||||
// Shutdown - shuts down HTTP server.
|
||||
func (srv *Server) Shutdown() error {
|
||||
if srv.listener == nil {
|
||||
return errors.New("server not initialized")
|
||||
}
|
||||
|
||||
if atomic.AddUint32(&srv.inShutdown, 1) > 1 {
|
||||
// shutdown in progress
|
||||
return errors.New("http server already in shutdown")
|
||||
|
Loading…
Reference in New Issue
Block a user