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

update libp2p for stream closure refactor #7747

Merged
merged 1 commit into from
Nov 15, 2020
Merged

Conversation

Copy link
Contributor

@aschmahmann aschmahmann left a comment

Choose a reason for hiding this comment

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

Are any changes to the /p2p folder required? e.g. In ipfs p2p close calling Close instead of Reset?

@Stebalien
Copy link
Member Author

Hm. Yes, we need to call CloseWrite and CloseRead in some cases.

@Stebalien
Copy link
Member Author

Ah, now I remember. I wrote some patches a while ago to fix this.

@Stebalien
Copy link
Member Author

Actually, the p2p code was wrong (I think?) because it didn't wait for an EOF. Now it's more correct because "close" actually closes the stream in both directions.

Ideally, we'd support half-open streams instead of closing the streams in both directions, but that's very tricky to get right and probably not worth it for now.

@Stebalien
Copy link
Member Author

This should be ready to merge.

@Stebalien
Copy link
Member Author

Ok, it was a but in bitswap. All fixed.

@aschmahmann aschmahmann merged commit b4dbfd3 into master Nov 15, 2020
@aschmahmann aschmahmann mentioned this pull request Feb 18, 2021
73 tasks
@gammazero gammazero deleted the feat/rw-close branch April 14, 2021 18:18
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