mirror of
https://github.com/minio/minio.git
synced 2025-04-15 00:35:31 -04:00
Fix buffered streams missing final entries (#21122)
On buffered streams the final entries could be missing, if a lot are delivered when stream ends. Fixes end-of-stream cancelling return of final entries by canceling with the StreamEOF error.
This commit is contained in:
parent
2b34e5b9ae
commit
02a67cbd2a
@ -1634,10 +1634,9 @@ func (c *Connection) handleMuxServerMsg(ctx context.Context, m message) {
|
||||
}
|
||||
if m.Flags&FlagEOF != 0 {
|
||||
if v.cancelFn != nil && m.Flags&FlagPayloadIsErr == 0 {
|
||||
// We must obtain the lock before calling cancelFn
|
||||
// We must obtain the lock before closing
|
||||
// Otherwise others may pick up the error before close is called.
|
||||
v.respMu.Lock()
|
||||
v.cancelFn(errStreamEOF)
|
||||
v.closeLocked()
|
||||
v.respMu.Unlock()
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user