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

[FIXED] Do not use sync.Once.Do() in connection's first request init #538

Merged
merged 1 commit into from
Jan 15, 2020

Conversation

kozlovic
Copy link
Member

@kozlovic kozlovic commented Jan 7, 2020

Replaced the use of sync.Once.Do() with a subscribe() version that
does not grab the lock (and assume to be running under the conn
lock).

Fixed some tests to reduce risk of go routine hanging at the end
of some tests.
Close the connection's asyncCBHandler even when close() is not
pushing disconnect/close CB.

Resolves #537

Signed-off-by: Ivan Kozlovic ivan@synadia.com

Replaced the use of sync.Once.Do() with a subscribe() version that
does not grab the lock (and assume to be running under the conn
lock).

Fixed some tests to reduce risk of go routine hanging at the end
of some tests.
Close the connection's asyncCBHandler even when close() is not
pushing disconnect/close CB.

Resolves #537

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
@kozlovic kozlovic requested a review from derekcollison January 7, 2020 22:02
Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

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

LGTM

@coveralls
Copy link

Coverage Status

Coverage increased (+0.08%) to 91.738% when pulling 409e5b8 on fix_537 into 5a67486 on master.

@kozlovic kozlovic merged commit 6dfc354 into master Jan 15, 2020
@kozlovic kozlovic deleted the fix_537 branch January 15, 2020 16:15
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.

There is some probleam in createNewRequestAndSend nats.go:2708
3 participants