mirror of
https://github.com/owncloud/android-library.git
synced 2025-06-07 16:06:08 +00:00
Fix concurrent exception that appears from time to time
This commit is contained in:
parent
91c6183090
commit
176de93abc
@ -30,7 +30,7 @@ import okhttp3.Response;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.ListIterator;
|
||||
|
||||
/**
|
||||
* Http interceptor to use multiple interceptors in the same {@link okhttp3.OkHttpClient} instance
|
||||
@ -86,7 +86,7 @@ public class HttpInterceptor implements Interceptor {
|
||||
}
|
||||
|
||||
public void deleteRequestHeaderInterceptor(String headerName) {
|
||||
Iterator<RequestInterceptor> requestInterceptorIterator = mRequestInterceptors.iterator();
|
||||
ListIterator<RequestInterceptor> requestInterceptorIterator = mRequestInterceptors.listIterator();
|
||||
while (requestInterceptorIterator.hasNext()) {
|
||||
RequestInterceptor currentRequestInterceptor = requestInterceptorIterator.next();
|
||||
if (currentRequestInterceptor instanceof RequestHeaderInterceptor &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user