-
Notifications
You must be signed in to change notification settings - Fork 354
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
Send root-cause errors from connection to onClose of RSocket #797
Conversation
Signed-off-by: Oleh Dokuka <shadowgun@i.ua>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good.
One thought is that the onClose
of the responder will not be used as far as I can see (RSocketResponder
is created without being accessed). I suppose nothing wrong with making request and responder consistent still.
@@ -619,6 +623,10 @@ private void tryTerminateOnKeepAlive(KeepAlive keepAlive) { | |||
String.format("No keep-alive acks for %d ms", keepAlive.getTimeout().toMillis()))); | |||
} | |||
|
|||
private void tryTerminateOnConnectionClose(Throwable e) { | |||
tryTerminate(() -> e); | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tryTerminateOnConnectionError
perhaps?
} | ||
private void tryTerminateOnConnectionClose(Throwable e) { | ||
tryTerminate(() -> e); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tryTerminateOnConnectionError
?
Co-Authored-By: Rossen Stoyanchev <rstoyanchev@users.noreply.github.com>
Signed-off-by: Oleh Dokuka <shadowgun@i.ua>
This PR is a followup to previous
RSocketFactory#errorConsumer
deprecation and future removal.That said, we have to have access to the reason of RSocket termination and right now it would be the best to enhance
Mono<Void> onClose
and propagate the root-cause error (e.g Stream ID 0 errors which are terminal) over that APISigned-off-by: Oleh Dokuka shadowgun@i.ua