title: How to reconnect ReactorNettyWebSocketClient connection?
body: <p>I need to access a websocket-service which closes an open websocket-connection after 24h. How do I have to implement the reconnect with Spring-Boot 2 and Webflux?</p>
  
  <p>This is what I have so far (taken from <a href="https://github.com/artembilan/webflux-websocket-demo" rel="nofollow noreferrer">https://github.com/artembilan/webflux-websocket-demo</a>):</p>
  
  <pre><code>@GetMapping(path = "/stream", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
  public Flux&lt;String&gt; getStreaming() throws URISyntaxException {
      ReactorNettyWebSocketClient client = new ReactorNettyWebSocketClient();
  
      EmitterProcessor&lt;String&gt; output = EmitterProcessor.create();
  
      Mono&lt;Void&gt; sessionMono = client.execute(new URI("ws://localhost:8080/echo"),
  
      session -&gt; session.receive()
      .timeout(Duration.ofSeconds(3))
      .map(WebSocketMessage::getPayloadAsText)
      .subscribeWith(output)
      .then());
  
      return output.doOnSubscribe(s -&gt; sessionMono.subscribe());
  }
  </code></pre>
  
  <p>As soon as the connection gets lost (3 seconds no input anymore), a TimeoutException is thrown. But how can I reconnect the socket?</p>