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

Avoid deadlock on data bigger than buffer by chunking #65

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

emhane
Copy link
Member

@emhane emhane commented May 28, 2023

A deadlock occurs when the data to send is bigger than the available buffer. Chunking data removes this deadlock.

@KolbyML
Copy link
Member

KolbyML commented May 28, 2023

For tracking this is an alternative proposed solution to to #61. Details of the bug can be found here #56 .

src/conn.rs Outdated Show resolved Hide resolved
@KolbyML
Copy link
Member

KolbyML commented May 28, 2023

#65 (comment)

This is why I made the PR for this problem #61 . Cause fixing the problem at a deeper level requires a refactor, unless you increase complexity which is what your proposal proposes. Which I guess is fine temporary.

The refactor would be something like combining pending_writes and send_buf into one, since having them both is quite redundant since we already have an outgoing buffer which is sent_packets.packets packets should be renamed to outgoing_buffer to better represent the reference implementations

@KolbyML
Copy link
Member

KolbyML commented May 28, 2023

If we choose your temporary solution over mine, you should add a TODO to this PR of.

// todo: combine pending_writes and send_buf

I will rename sent_packets.packets in my overflow fix PR's

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