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) {
119119
120120 }
121121
122+
122123 /**
123124 * Build the HTTP Client call
124125 * @return Call
125126 */
126127 private Call BuildClientCall () {
127128
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 ();
129136
130137 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
136139 .proxy (this .proxy )
137140 .build ();
138141
You can’t perform that action at this time.
0 commit comments