我想要做的是多次调用相同的API服务:
@POST("./")
Observable<GetUploadPartResponse> uploadPart(@Header("Authorization") String auth, @Body RequestBody part);
private void doCall(){
mService.uploadPart(auth, body)
.subscribeOn(Schedulers.newThread())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Subscriber<GetUploadPartResponse>() {
@Override
public void onCompleted() {
}
@Override
public void onError(Throwable e) {
}
@Override
public void onNext(GetUploadPartResponse response) {
});
}
我想做这样的事情:
for(int i = 0; i < multipleTimes; i++){
doCall();
}
问题是当multipleTimes为30且更大时,它会给我一个SocketTimeoutException。