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

Fix flushing of rejects before disconnecting #3429

Merged
merged 3 commits into from
Apr 17, 2020

Conversation

codablock
Copy link

See individual commits.

This is currently based on #3421. I'll rebase after it got merged.

src/net.h Show resolved Hide resolved
This was only used in only one remaining place and only to ensure that
reject messages are sent before closing sockets. This is solved by the
previous commit now.
@codablock codablock force-pushed the pr_remove_optimistic_send branch from ded6168 to d8bbdee Compare April 17, 2020 09:32
@codablock
Copy link
Author

It looks like this fix won't be enough to reliably flush send (rejects) buffers. I read into how socket close() works and it will force-close a socket in case there is pending data in the receive buffer, which will then lead to loss of the sent data. I'll try to figure out how to fix this.

@codablock codablock force-pushed the pr_remove_optimistic_send branch from fbe1fcb to 08b57c1 Compare April 17, 2020 10:42
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

utACK

Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

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

utACK, some diffs scare me when it comes to backports, but its fine

@codablock codablock merged commit 96ed9fa into dashpay:develop Apr 17, 2020
@codablock codablock deleted the pr_remove_optimistic_send branch April 17, 2020 19:46
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.

3 participants