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 leaks on reconnection #123

Merged
merged 1 commit into from
Dec 6, 2020
Merged

fix leaks on reconnection #123

merged 1 commit into from
Dec 6, 2020

Conversation

whyoleg
Copy link
Member

@whyoleg whyoleg commented Dec 5, 2020

No description provided.

@whyoleg whyoleg added the bug label Dec 5, 2020
@whyoleg whyoleg added this to the 0.12.0 milestone Dec 5, 2020
@whyoleg whyoleg self-assigned this Dec 5, 2020

//null pointer will never happen
private suspend fun currentRSocket(): RSocket = state.value.handleState { reconnectHandler.first() }!!
private suspend fun currentRSocket(closeable: Closeable): RSocket = closeable.closeOnError { currentRSocket() }
Copy link
Member

Choose a reason for hiding this comment

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

It makes sense after digging into the code, but the closeOnError confused me for a bit. I think wildcard imports don't help.

@whyoleg whyoleg merged commit 3353ab4 into master Dec 6, 2020
@whyoleg whyoleg deleted the bug/fix-leaks-on-reconnection branch December 6, 2020 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants