Closed
Description
When using Jersey client in a Spring Boot context the connection timeout is the double of what is defined when posting an entity. In short:
client.property(ClientProperties.CONNECT_TIMEOUT, 2000);
invocationBuilder.post(null); // correct connection timeout of 2 sec
invocationBuilder.post(Entity.json(request)); // double connection timeout 4 sec
The problem started with Jersey version 2.31. This project demonstrates the issue with a minimal example: https://github.com/oleborup/jersey-client-connection-timeout
I have not been able to reproduce this in a non Spring Boot context only relying on Jersey dependencies, therefore trying to post here.
Spring Boot version: 2.5.0
Java version: OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_292-b10)