mirror of https://github.com/minio/minio.git
fix: server in shutdown should return 503 instead of 403 (#13496)
various situations where the client is retrying the request server going through shutdown might incorrectly send 403 which is a non-retriable error, this PR allows for clients when they retry an attempt to go to another healthy pod or server in a distributed cluster - assuming it is a properly load-balanced setup.
This commit is contained in:
parent
e7f559c582
commit
087dc13965
|
@ -90,7 +90,7 @@ func (srv *Server) Start(ctx context.Context) (err error) {
|
|||
if atomic.LoadUint32(&srv.inShutdown) != 0 {
|
||||
// To indicate disable keep-alives
|
||||
w.Header().Set("Connection", "close")
|
||||
w.WriteHeader(http.StatusForbidden)
|
||||
w.WriteHeader(http.StatusServiceUnavailable)
|
||||
w.Write([]byte(http.ErrServerClosed.Error()))
|
||||
w.(http.Flusher).Flush()
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue