File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
injectionApi/src/main/java/com/socketLabs/injectionApi/core Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -119,20 +119,23 @@ public void onFailure(Call call, IOException ex) {
119
119
120
120
}
121
121
122
+
122
123
/**
123
124
* Build the HTTP Client call
124
125
* @return Call
125
126
*/
126
127
private Call BuildClientCall () {
127
128
128
- OkHttpClient client = new OkHttpClient ();
129
+ OkHttpClient .Builder clientBuilder = new OkHttpClient .Builder ()
130
+ .connectTimeout (this .timeout , TimeUnit .SECONDS )
131
+ .writeTimeout (this .timeout , TimeUnit .SECONDS )
132
+ .readTimeout (this .timeout , TimeUnit .SECONDS )
133
+ .callTimeout (this .timeout , TimeUnit .SECONDS );
134
+
135
+ OkHttpClient client = clientBuilder .build ();
129
136
130
137
if (this .proxy != null )
131
- client = new OkHttpClient .Builder ()
132
- .connectTimeout (this .timeout , TimeUnit .SECONDS )
133
- .writeTimeout (this .timeout , TimeUnit .SECONDS )
134
- .readTimeout (this .timeout , TimeUnit .SECONDS )
135
- .callTimeout (this .timeout , TimeUnit .SECONDS )
138
+ client = clientBuilder
136
139
.proxy (this .proxy )
137
140
.build ();
138
141
You can’t perform that action at this time.
0 commit comments