Skip to content

Commit

Permalink
Fix socket timeout and parallel creation
Browse files Browse the repository at this point in the history
  • Loading branch information
jianghaolu committed Aug 29, 2016
1 parent 2c7a100 commit 7fb2d38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ public Builder(OkHttpClient.Builder httpClientBuilder, Retrofit.Builder retrofit
// Set up OkHttp client
this.httpClientBuilder = httpClientBuilder
.cookieJar(new JavaNetCookieJar(cookieManager))
.readTimeout(30, TimeUnit.SECONDS)
.addInterceptor(userAgentInterceptor);
this.retrofitBuilder = retrofitBuilder;
this.buildable = new Buildable();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void execute() throws Exception {

@Override
public Observable<T> executeAsync() {
return executeReadyTasksAsync();
return executeReadyTasksAsync().last();
}

@Override
Expand Down Expand Up @@ -101,6 +101,6 @@ public Observable<T> call(T t) {
}));
nextNode = dag.getNext();
}
return Observable.merge(observables).last();
return Observable.merge(observables);
}
}

0 comments on commit 7fb2d38

Please sign in to comment.