Skip to content

Commit d1b0aa7

Browse files
committed
Restored the idle connection evictor thread
Setting `ClientProperties.CONNECT_TIMEOUT` and `ClientProperties.READ_TIMEOUT` to 1s
1 parent ed9a23d commit d1b0aa7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/com/atomgraph/linkeddatahub/Application.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1412,7 +1412,8 @@ public void releaseConnection(final HttpClientConnection managedConn, final Obje
14121412
config.register(new QueryProvider());
14131413
config.register(new UpdateRequestProvider());
14141414
config.property(ClientProperties.FOLLOW_REDIRECTS, true);
1415-
//config.property(ClientProperties.CONNECT_TIMEOUT, 1000);
1415+
config.property(ClientProperties.CONNECT_TIMEOUT, 1000);
1416+
config.property(ClientProperties.READ_TIMEOUT, 1000);
14161417
config.property(ClientProperties.REQUEST_ENTITY_PROCESSING, RequestEntityProcessing.BUFFERED); // https://stackoverflow.com/questions/42139436/jersey-client-throws-cannot-retry-request-with-a-non-repeatable-request-entity
14171418
config.property(ApacheClientProperties.CONNECTION_MANAGER, conman);
14181419
config.property(ApacheClientProperties.CONNECTION_CLOSING_STRATEGY, new ApacheConnectionClosingStrategy.GracefulClosingStrategy());
@@ -1509,6 +1510,8 @@ public void releaseConnection(final HttpClientConnection managedConn, final Obje
15091510
config.register(new QueryProvider());
15101511
config.register(new UpdateRequestProvider()); // TO-DO: UpdateRequestProvider
15111512
config.property(ClientProperties.FOLLOW_REDIRECTS, true);
1513+
config.property(ClientProperties.CONNECT_TIMEOUT, 1000);
1514+
config.property(ClientProperties.READ_TIMEOUT, 1000);
15121515
config.property(ClientProperties.REQUEST_ENTITY_PROCESSING, RequestEntityProcessing.BUFFERED); // https://stackoverflow.com/questions/42139436/jersey-client-throws-cannot-retry-request-with-a-non-repeatable-request-entity
15131516
config.property(ApacheClientProperties.CONNECTION_MANAGER, conman);
15141517
config.property(ApacheClientProperties.CONNECTION_CLOSING_STRATEGY, new ApacheConnectionClosingStrategy.GracefulClosingStrategy());

0 commit comments

Comments
 (0)