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

reduce the packet count #29

Merged
merged 2 commits into from
Oct 12, 2018
Merged

reduce the packet count #29

merged 2 commits into from
Oct 12, 2018

Conversation

Stebalien
Copy link
Member

@Stebalien Stebalien commented Sep 14, 2018

Send header in the same message as the body.

@ghost ghost assigned Stebalien Sep 14, 2018
@ghost ghost added the status/in-progress In progress label Sep 14, 2018
@Stebalien Stebalien force-pushed the fix/fewer-packets branch 2 times, most recently from 25b7b5f to 17259f2 Compare September 14, 2018 03:13
@Stebalien
Copy link
Member Author

This should help a bit but we should still buffer the stream open headers until we need to send data.

@Stebalien
Copy link
Member Author

I've also fixed #7 (technically) by just killing the connection on partial writes.

@raulk raulk added the kind/enhancement A net-new feature or improvement to an existing feature label Sep 19, 2018
That way, we don't send a bunch of tiny packets. The extra copy is nothing
compared to that.
fixes #7 (not the best way but it works)
if err := mp.con.SetWriteDeadline(time.Time{}); err != nil {
return err
// only return this error if we don't *already* have an error from the write.
if err2 := mp.con.SetWriteDeadline(time.Time{}); err == nil && err2 != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

so we were eating the original error here? nice catch!

@Stebalien Stebalien merged commit 0ef5fed into master Oct 12, 2018
@ghost ghost removed the status/in-progress In progress label Oct 12, 2018
@Stebalien Stebalien deleted the fix/fewer-packets branch October 12, 2018 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A net-new feature or improvement to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants