Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

requestChannel never completes if server cancels  #592

Copy link
Copy link
@rstoyanchev

Description

@rstoyanchev
Issue body actions

Given the code below, the client hangs with the following output:

18:31:15.813 [main] INFO  r.F.C.1 - onSubscribe(FluxConcatArray.ConcatArraySubscriber)
18:31:15.827 [main] INFO  r.F.C.1 - request(unbounded)
public static void main(String[] args) {

  CloseableChannel serverCloseable = RSocketFactory.receive()
      .acceptor((setup, sendingSocket) ->
          Mono.just(new AbstractRSocket() {

            @Override
            public Flux<Payload> requestChannel(Publisher<Payload> payloads) {
              return Flux.from(payloads).log().next()
                  .flatMapMany(in -> Flux.range(1, 3).map(i -> {
                    String data = in.getDataUtf8();
                    return DefaultPayload.create(data + "-" + i);
                  }));
            }
          }))
      .transport(TcpServerTransport.create("localhost", 7000))
      .start()
      .block();

  RSocket rsocket = RSocketFactory.connect()
      .dataMimeType(MimeTypeUtils.TEXT_PLAIN_VALUE)
      .transport(TcpClientTransport.create("localhost", 7000))
      .start()
      .block();

  Flux<Payload> payloadFlux = Flux.just(DefaultPayload.create("foo"), DefaultPayload.create("bar"));
  rsocket.requestChannel(payloadFlux).log().blockLast();

  rsocket.dispose();
  serverCloseable.dispose();
}

I think the scenario is invalid because the server cancels the input stream and then continues to produce output, but still the client probably shouldn't hang.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.