소스 검색

chore: 增加okhttp read timeout

TianChenjiang 3 년 전
부모
커밋
5aedb16833
3개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      pom.xml
  2. 1 1
      seecoder-build-client/pom.xml
  3. 1 0
      seecoder-build-client/src/main/java/cn/seecoder/build/client/SeecoderBuildClient.java

+ 1 - 1
pom.xml

@@ -12,7 +12,7 @@
     <groupId>cn.seecoder</groupId>
     <artifactId>seecoder-build</artifactId>
     <packaging>pom</packaging>
-    <version>0.2.0</version>
+    <version>0.3.0</version>
     <modules>
         <module>seecoder-build-client</module>
         <module>seecoder-build-server</module>

+ 1 - 1
seecoder-build-client/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>seecoder-build</artifactId>
         <groupId>cn.seecoder</groupId>
-        <version>0.2.0</version>
+        <version>0.3.0</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>

+ 1 - 0
seecoder-build-client/src/main/java/cn/seecoder/build/client/SeecoderBuildClient.java

@@ -36,6 +36,7 @@ public class SeecoderBuildClient implements SeecoderBuildApi {
                 .connectTimeout(60, TimeUnit.SECONDS)
                 .writeTimeout(60,TimeUnit.SECONDS)
                 .retryOnConnectionFailure(true)
+                .readTimeout(1, TimeUnit.DAYS) // TODO 只是暂时的解决办法,未来考虑Call改为异步或者用连接池
                 .build();
     }