This repository was archived by the owner on Mar 16, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/android/src/main/java/com/RNFetchBlob Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ enum ResponseType {
75
75
public static HashMap <String , Call > taskTable = new HashMap <>();
76
76
static HashMap <String , Boolean > progressReport = new HashMap <>();
77
77
static HashMap <String , Boolean > uploadProgressReport = new HashMap <>();
78
- static ConnectionPool pool = new ConnectionPool (5 , 30000 , TimeUnit . MILLISECONDS );
78
+ static ConnectionPool pool = new ConnectionPool ();
79
79
80
80
MediaType contentType = RNFetchBlobConst .MIME_OCTET ;
81
81
ReactApplicationContext ctx ;
@@ -315,6 +315,10 @@ public Response intercept(Chain chain) throws IOException {
315
315
clientBuilder .connectTimeout (options .timeout , TimeUnit .MILLISECONDS );
316
316
clientBuilder .readTimeout (options .timeout , TimeUnit .MILLISECONDS );
317
317
}
318
+ else {
319
+ clientBuilder .connectTimeout (-1 , TimeUnit .MILLISECONDS );
320
+ clientBuilder .readTimeout (-1 , TimeUnit .MILLISECONDS );
321
+ }
318
322
clientBuilder .connectionPool (pool );
319
323
clientBuilder .retryOnConnectionFailure (false );
320
324
OkHttpClient client = clientBuilder .build ();
You can’t perform that action at this time.
0 commit comments