title: Can I use block() method of Flux returned from Spring5's WebClient?
body: <p>I created Spring Boot 2.0 demo application which contains two applications that communicate using WebClient. And I'm suffering that they often stop communicating when I use block() method of Flux from the WebClient's response. I want to use List not Flux by some reasons.</p>
  
  <p>The server side application is like this. It just returns Flux object.</p>
  
  <pre><code>@GetMapping
  public Flux&lt;Item&gt; findAll() {
      return Flux.fromIterable(items);
  }
  </code></pre>
  
  <p>And the client side (or BFF side) application is like this. I get Flux from the server and convert it to List by calling block() method.</p>
  
  <pre><code>@GetMapping
  public List&lt;Item&gt; findBlock() {
      return webClient.get()
          .retrieve()
          .bodyToFlux(Item.class)
          .collectList()
          .block(Duration.ofSeconds(10L));
  }
  </code></pre>
  
  <p>While it works well at first, findBlock() won't respond and timeouts after several times access. When I modify the findBlock() method to return Flux deleting collectList() and block(), it works well. Then I assume that block() method cause this problem.<br>
  And, when I modify the findAll() method to return List, nothing changes.</p>
  
  <p>Source code of the entire example application is here.<br>
  <a href="https://github.com/cero-t/webclient-example" rel="noreferrer">https://github.com/cero-t/webclient-example</a></p>
  
  <p>"resource" is the server application, and "front" is the client application. After running both application, when I access to localhost:8080 it works well and I can reload any times, but when I access to localhost:8080/block it seems to work well but after several reloads it won't respond.</p>
  
  <hr>
  
  <p>By the way, when I add "spring-boot-starter-web" dependency to the "front" applications's (not resource application's) pom.xml, which means I use tomcat, this problem never happens. Is this problem due to Netty server?</p>
  
  <p>Any guidance would be greatly appreciated.</p>