@@ -96,28 +96,25 @@ public class ZaiConfig {
9696 private TimeUnit connectionPoolTimeUnit = TimeUnit .SECONDS ;
9797
9898 /**
99- * Request timeout in specified time unit.
99+ * Request timeout in specified time unit. The whole timeout for complete calls, is
100+ * the okhttp call timeout.
100101 */
101- @ Builder .Default
102- private int requestTimeOut = 300 ;
102+ private Integer requestTimeOut ;
103103
104104 /**
105105 * Connection timeout in specified time unit.
106106 */
107- @ Builder .Default
108- private int connectTimeout = 100 ;
107+ private Integer connectTimeout ;
109108
110109 /**
111110 * Read timeout in specified time unit.
112111 */
113- @ Builder .Default
114- private int readTimeout = 100 ;
112+ private Integer readTimeout ;
115113
116114 /**
117115 * Write timeout in specified time unit.
118116 */
119- @ Builder .Default
120- private int writeTimeout = 100 ;
117+ private Integer writeTimeout ;
121118
122119 /**
123120 * Time unit for timeout configurations.
@@ -282,8 +279,8 @@ public TimeUnit getConnectionPoolTimeUnit() {
282279 /**
283280 * Gets request timeout with system property and environment variable fallback.
284281 */
285- public int getRequestTimeOut () {
286- if (requestTimeOut != 300 ) {
282+ public Integer getRequestTimeOut () {
283+ if (requestTimeOut != null ) {
287284 return requestTimeOut ;
288285 }
289286 String propValue = System .getProperty (ENV_REQUEST_TIMEOUT );
@@ -302,8 +299,8 @@ public int getRequestTimeOut() {
302299 /**
303300 * Gets connect timeout with system property and environment variable fallback.
304301 */
305- public int getConnectTimeout () {
306- if (connectTimeout != 100 ) {
302+ public Integer getConnectTimeout () {
303+ if (connectTimeout != null ) {
307304 return connectTimeout ;
308305 }
309306 String propValue = System .getProperty (ENV_CONNECT_TIMEOUT );
@@ -322,8 +319,8 @@ public int getConnectTimeout() {
322319 /**
323320 * Gets read timeout with system property and environment variable fallback.
324321 */
325- public int getReadTimeout () {
326- if (readTimeout != 100 ) {
322+ public Integer getReadTimeout () {
323+ if (readTimeout != null ) {
327324 return readTimeout ;
328325 }
329326 String propValue = System .getProperty (ENV_READ_TIMEOUT );
@@ -342,8 +339,8 @@ public int getReadTimeout() {
342339 /**
343340 * Gets write timeout with system property and environment variable fallback.
344341 */
345- public int getWriteTimeout () {
346- if (writeTimeout != 100 ) {
342+ public Integer getWriteTimeout () {
343+ if (writeTimeout != null ) {
347344 return writeTimeout ;
348345 }
349346 String propValue = System .getProperty (ENV_WRITE_TIMEOUT );
0 commit comments