Skip to content

Conversation

@mostroverkhov
Copy link
Member

No description provided.

@Override
public Mono<RSocket> accept(ConnectionSetupPayload setup, RSocket sendingSocket) {
senderRSockets.onNext(sendingSocket);
return Mono.error(new RuntimeException(errorMessage));
Copy link
Member

@yschimke yschimke Sep 23, 2018

Choose a reason for hiding this comment

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

Why not use RejectedSetupException? As in any other exception is an internal error, but this would indicate a valid we just didn't like this.

n.b. I see you translate elsewhere, so just curious.

Copy link
Member Author

Choose a reason for hiding this comment

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

I thought It is not feasible to force (and expect) people use correct exception, so this test verifies any exception is translated to RejectedSetupException

(in, out) -> {
in.context().addHandler(new RSocketLengthCodec());
TcpDuplexConnection connection = new TcpDuplexConnection(in, out, in.context());
acceptor.apply(connection).subscribe();
Copy link
Member

Choose a reason for hiding this comment

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

nice! I think this removes a warning.

Copy link
Member

@yschimke yschimke left a comment

Choose a reason for hiding this comment

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

LGTM - just one question

@yschimke yschimke merged commit b75d68f into 1.0.x Sep 28, 2018
@yschimke yschimke deleted the feature/server-setup-reject branch September 28, 2018 05:28
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.

3 participants