I\'m trying to set timeout on my WebClient, here is the current code :
SslContext sslContext = SslContextBuilder.forClient().trustManager(InsecureTrustManag
Based on the above comment if you want to add a Socket Timeout just add it as another option in the same timeoutClient.
TcpClient timeoutClient = TcpClient.create()
.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, SECONDS*10) //Connect Timeout
.option(ChannelOption.SO_TIMEOUT,1000) // Socket Timeout
.doOnConnected(
c -> c.addHandlerLast(new ReadTimeoutHandler(SECONDS))
.addHandlerLast(new WriteTimeoutHandler(SECONDS)));
return webClientBuilder.baseUrl(YOUR_URL)
.clientConnector(new ReactorClientHttpConnector(HttpClient.from(timeoutClient)))
.build();