Skip to content

Commit 6ed3e86

Browse files
adding timeouts for all parts of the call
1 parent 8d2166d commit 6ed3e86

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

injectionApi/src/main/java/com/socketLabs/injectionApi/core/HttpRequest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ private Call BuildClientCall() {
127127

128128
if (this.proxy != null)
129129
client = new OkHttpClient.Builder()
130+
.connectTimeout(this.timeout, TimeUnit.SECONDS)
131+
.writeTimeout(this.timeout, TimeUnit.SECONDS)
132+
.readTimeout(this.timeout, TimeUnit.SECONDS)
130133
.callTimeout(this.timeout, TimeUnit.SECONDS)
131134
.proxy(this.proxy)
132135
.build();

0 commit comments

Comments
 (0)