diff options
author | Jesse Wilson <jessewilson@google.com> | 2011-03-31 11:54:23 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-03-31 11:54:23 -0700 |
commit | 9fa7c4cd4a619236db70aefab8da3abafb065bca (patch) | |
tree | 878c53d35f6960c9c7621afa09a8c4eb087b7685 /support | |
parent | 0ade5524d972b9dfd69b0126aa4c35319c1b7fa4 (diff) | |
parent | 866b399e1d5cab4cc8d196f8008ba8ad8376765d (diff) | |
download | libcore-9fa7c4cd4a619236db70aefab8da3abafb065bca.zip libcore-9fa7c4cd4a619236db70aefab8da3abafb065bca.tar.gz libcore-9fa7c4cd4a619236db70aefab8da3abafb065bca.tar.bz2 |
am 866b399e: am 9d28a32d: am bc4c79c6: Don\'t read from the delegate stream after we close it.
* commit '866b399e1d5cab4cc8d196f8008ba8ad8376765d':
Don't read from the delegate stream after we close it.
Diffstat (limited to 'support')
-rw-r--r-- | support/src/test/java/tests/http/MockWebServer.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/support/src/test/java/tests/http/MockWebServer.java b/support/src/test/java/tests/http/MockWebServer.java index 0cdd561..2083117 100644 --- a/support/src/test/java/tests/http/MockWebServer.java +++ b/support/src/test/java/tests/http/MockWebServer.java @@ -33,11 +33,12 @@ import java.net.URL; import java.net.UnknownHostException; import java.util.ArrayList; import java.util.Collections; -import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; import java.util.concurrent.BlockingQueue; +import java.util.concurrent.Callable; +import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.LinkedBlockingDeque; @@ -63,7 +64,7 @@ public final class MockWebServer { private final BlockingQueue<MockResponse> responseQueue = new LinkedBlockingDeque<MockResponse>(); private final Set<Socket> openClientSockets - = Collections.synchronizedSet(new HashSet<Socket>()); + = Collections.newSetFromMap(new ConcurrentHashMap<Socket, Boolean>()); private boolean singleResponse; private final AtomicInteger requestCount = new AtomicInteger(); private int bodyLimit = Integer.MAX_VALUE; |