pixel
pixel

Reputation: 26441

How to set TCP Keepalive in Reactor Netty HTTP client?

I saw that

HttpClient.from(TcpClient.create().option(ChannelOption.SO_KEEPALIVE, true)) 

from method was deprecated.

How currently am I supposed to set SO_KEEPALIVE using HttpClient.create()?

Upvotes: 5

Views: 2336

Answers (1)

pixel
pixel

Reputation: 26441

It was easier that I thought:

HttpClient.create().option(ChannelOption.SO_KEEPALIVE, true)

Upvotes: 8

Related Questions