Skip to content

oleborup/jersey-client-connection-timeout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

For Jersey client >= 2.31 the client connection timeout is double the configured if posting an entity.

    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

To reproduce see test TimeoutTest

mvn test

Expected both requests to timeout after approximately 2 secs.

The problem was introduced with Jersey 2.31. To demonstrate downgrade Jersey in pom.xml to version 2.30 with

<jersey.version>2.30</jersey.version>

About

Project to demonstrate Jersey connection timeout

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages