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

Buffer the done channel when adding storage collateral #249

Merged
merged 1 commit into from
May 12, 2020

Conversation

ingar
Copy link
Contributor

@ingar ingar commented May 12, 2020

Problem

Unbuffered channels in the top-level functions AddPaymentEscrow and AddStorageCollateral can deadlock if the implementation of WaitForMessage is synchronous.

Solution

Make channels have a buffer.

Copy link
Collaborator

@hannahhoward hannahhoward left a comment

Choose a reason for hiding this comment

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

LGTM

@hannahhoward hannahhoward merged commit 04053b3 into master May 12, 2020
@ingar ingar deleted the fix/deadlock-adding-collateral branch June 24, 2020 16:47
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.

2 participants