mirror of
https://github.com/minio/minio.git
synced 2025-04-27 13:24:52 -04: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.
|
// Shutdown - shuts down HTTP server.
|
||||||
func (srv *Server) Shutdown() error {
|
func (srv *Server) Shutdown() error {
|
||||||
|
if srv.listener == nil {
|
||||||
|
return errors.New("server not initialized")
|
||||||
|
}
|
||||||
|
|
||||||
if atomic.AddUint32(&srv.inShutdown, 1) > 1 {
|
if atomic.AddUint32(&srv.inShutdown, 1) > 1 {
|
||||||
// shutdown in progress
|
// shutdown in progress
|
||||||
return errors.New("http server already in shutdown")
|
return errors.New("http server already in shutdown")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user