mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
Fix blocked streams blocking reconnects (#19017)
We have observed cases where a blocked stream will block for cancellations. This happens when response channel is blocked and we want to push an error. This will have the response mutex locked, which will prevent all other operations until upstream is unblocked. Make this behavior non-blocking and if blocked spawn a goroutine that will send the response and close the output. Still a lot of "dancing". Added a test for this and reviewed.
This commit is contained in:
@@ -41,7 +41,8 @@ type Stream struct {
|
||||
// Requests sent cannot be used any further by the called.
|
||||
Requests chan<- []byte
|
||||
|
||||
ctx context.Context
|
||||
muxID uint64
|
||||
ctx context.Context
|
||||
}
|
||||
|
||||
// Send a payload to the remote server.
|
||||
|
||||
Reference in New Issue
Block a user