Skip to content

ensures that resumability implementation is stable #934

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

Merged
merged 3 commits into from
Sep 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -583,13 +583,14 @@ public Mono<RSocket> connect(Supplier<ClientTransport> transportSupplier) {
resume.getStoreFactory(CLIENT_TAG).apply(resumeToken);
final ResumableDuplexConnection resumableDuplexConnection =
new ResumableDuplexConnection(
clientServerConnection, resumableFramesStore);
CLIENT_TAG,
clientServerConnection,
resumableFramesStore);
final ResumableClientSetup resumableClientSetup =
new ResumableClientSetup();
final ClientRSocketSession session =
new ClientRSocketSession(
resumeToken,
clientServerConnection,
resumableDuplexConnection,
connectionMono,
resumableClientSetup::init,
Expand Down
5 changes: 3 additions & 2 deletions rsocket-core/src/main/java/io/rsocket/core/ServerSetup.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public Mono<Void> acceptRSocketSetup(

final ResumableFramesStore resumableFramesStore = resumeStoreFactory.apply(resumeToken);
final ResumableDuplexConnection resumableDuplexConnection =
new ResumableDuplexConnection(duplexConnection, resumableFramesStore);
new ResumableDuplexConnection("server", duplexConnection, resumableFramesStore);
final ServerRSocketSession serverRSocketSession =
new ServerRSocketSession(
resumeToken,
Expand All @@ -134,7 +134,8 @@ public Mono<Void> acceptRSocketSetup(
public Mono<Void> acceptRSocketResume(ByteBuf frame, DuplexConnection duplexConnection) {
ServerRSocketSession session = sessionManager.get(ResumeFrameCodec.token(frame));
if (session != null) {
return session.resumeWith(frame, duplexConnection);
session.resumeWith(frame, duplexConnection);
return duplexConnection.onClose();
} else {
sendError(duplexConnection, new RejectedResumeException("unknown resume token"));
return duplexConnection.onClose();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
public abstract class BaseDuplexConnection implements DuplexConnection {
protected MonoProcessor<Void> onClose = MonoProcessor.create();

protected UnboundedProcessor<ByteBuf> sender = new UnboundedProcessor<>();
protected UnboundedProcessor sender = new UnboundedProcessor();

public BaseDuplexConnection() {
onClose.doFinally(s -> doOnClose()).subscribe();
Expand Down
Loading