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

Simplify RSocketClient/Server implementation and avoid unnecessary flatMap #467

Merged
merged 1 commit into from
Feb 5, 2018

Conversation

rdegnan
Copy link
Member

@rdegnan rdegnan commented Feb 3, 2018

Most of the diff here is from running googleJavaFormat -- the real changes are in RSocketClient/Server.

@rdegnan rdegnan requested a review from robertroeser February 3, 2018 22:09
.subscribe();
.subscribe(null, this::handleSendProcessorError);

this.receiveDisposable = connection.receive().subscribe(this::handleFrame, errorConsumer);
Copy link
Member

@robertroeser robertroeser Feb 4, 2018

Choose a reason for hiding this comment

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

This no longer composes the backpressure from the client code and netty. That's why it's a flat map - now it's disconnected because you have another subscription.

})
.doOnError(errorConsumer)
.subscribe();
connection.onClose().doFinally(signalType -> cleanup()).subscribe(null, errorConsumer);

connection
.send(sendProcessor)
Copy link
Member

Choose a reason for hiding this comment

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

I wrote them this way for readability - operator fusion should be happening so the difference should be negligible.

@robertroeser robertroeser merged commit ec42c83 into rsocket:1.0.x Feb 5, 2018
@bsideup bsideup mentioned this pull request Jan 3, 2019
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.

2 participants