Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

control: fix possible deadlock on network error #3857

Merged
merged 1 commit into from
May 11, 2023

Conversation

tonistiigi
Copy link
Member

When error appears on sending to network, channel
still needs to be read empty to ensure that the other side does not get blocked on sending to the channel.

When error appears on sending to network, channel
still needs to be read empty to ensure that the other
side does not get blocked on sending to the channel.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
@@ -168,7 +168,7 @@ func (c *Controller) Prune(req *controlapi.PruneRequest, stream controlapi.Contr
imageutil.CancelCacheLeases()
}

ch := make(chan client.UsageInfo)
ch := make(chan client.UsageInfo, 32)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only for performance so that prune speed would not depend on network speed.

@AkihiroSuda AkihiroSuda merged commit 2c2b779 into moby:master May 11, 2023
55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants