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

Manually redo of previous reconnect-buffer PR #314

Merged
merged 4 commits into from
Nov 4, 2019
Merged

Manually redo of previous reconnect-buffer PR #314

merged 4 commits into from
Nov 4, 2019

Conversation

danielwertheim
Copy link
Contributor

@danielwertheim danielwertheim commented Oct 30, 2019

It was easier to manually reapply changes from PR #284 Also fixes comments in that review. I've opened this PR up as a new PR so that you can compare that I didn't miss anything.

As it replaces #284 it also resolves #251

Copy link
Member

@ColinSullivan1 ColinSullivan1 left a comment

Choose a reason for hiding this comment

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

LGTM - Thanks!

@danielwertheim
Copy link
Contributor Author

@ColinSullivan1 fixed the failing test but I wonder if the "fix" is OK as in, is it OK for it to fail due to increased payload or was the intention to ensure the "queue" is filling up?d

@danielwertheim danielwertheim self-assigned this Nov 4, 2019
@ColinSullivan1
Copy link
Member

Hmm... I wanted to make sure the 2nd publish failed as it would overrun the full buffer, but PUB foo 20\r\n<20 bytes>\r\n is 34 bytes, which should have thrown on the first publish?

else
kickFlusher();

if (pending.Position + count + pubProtoLen > rbsize)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ColinSullivan1 Replying to your Q here instead to get the context.

First publish: 0+20+12 > 32

Second publish: 0+21+12 > 32

@ColinSullivan1
Copy link
Member

LGTM. Thanks!

@ColinSullivan1 ColinSullivan1 merged commit c958310 into nats-io:master Nov 4, 2019
@danielwertheim danielwertheim deleted the reconnect-buffer-redone branch November 4, 2019 19:17
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.

disable sending message during reconnect
2 participants