mirror of
https://github.com/minio/minio.git
synced 2025-01-11 15:03:22 -05:00
fix: for frozen calls return if client disconnects (#15062)
This commit is contained in:
parent
5fb420c703
commit
214ea14f29
@ -247,7 +247,12 @@ func maxClients(f http.HandlerFunc) http.HandlerFunc {
|
||||
if val := globalServiceFreeze.Load(); val != nil {
|
||||
if unlock, ok := val.(chan struct{}); ok && unlock != nil {
|
||||
// Wait until unfrozen.
|
||||
<-unlock
|
||||
select {
|
||||
case <-unlock:
|
||||
case <-r.Context().Done():
|
||||
// if client canceled we don't need to wait here forever.
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user