Skip to content

Commit

Permalink
update okhttp and set longer timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
JW Wesson committed May 8, 2024
1 parent 66c02cf commit 984d971
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.9.3</version>
<version>4.12.0</version>
</dependency>
</dependencies>

Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/textkernel/tx/TxClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
import java.util.Comparator;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;

/**
Expand Down Expand Up @@ -173,6 +174,9 @@ public Response intercept(Interceptor.Chain chain) throws IOException {
return chain.proceed(request);
}
})
.connectTimeout(10, TimeUnit.SECONDS)
.writeTimeout(10, TimeUnit.SECONDS)
.readTimeout(30, TimeUnit.SECONDS)
.build();
}

Expand Down

0 comments on commit 984d971

Please sign in to comment.