Chromium Code Reviews| Index: components/cronet/android/java/src/org/chromium/net/urlconnection/CronetHttpURLConnection.java |
| diff --git a/components/cronet/android/java/src/org/chromium/net/urlconnection/CronetHttpURLConnection.java b/components/cronet/android/java/src/org/chromium/net/urlconnection/CronetHttpURLConnection.java |
| index 1575a696d504f4efa0b8813d9a2f5ffd485d9304..e03ce2ae45ef4fa4d4573979ce0e6d4357a3dbff 100644 |
| --- a/components/cronet/android/java/src/org/chromium/net/urlconnection/CronetHttpURLConnection.java |
| +++ b/components/cronet/android/java/src/org/chromium/net/urlconnection/CronetHttpURLConnection.java |
| @@ -396,6 +396,15 @@ public class CronetHttpURLConnection extends HttpURLConnection { |
| return false; |
| } |
| + @Override |
| + public void setConnectTimeout(int timeout) { |
| + // Per-request connect timeout is not supported because of late binding. |
| + // Sockets are assigned to requests according to request priorities |
| + // when sockets are connected. This requires requests with the same host, |
| + // domain and port to have same timeout. |
| + throw new UnsupportedOperationException("Not supported"); |
|
pauljensen
2016/05/19 00:51:59
I'm not sure throwing an exception here is what we
|
| + } |
| + |
| /** |
| * Used by {@link CronetInputStream} to get more data from the network |
| * stack. This should only be called after the request has started. Note |
| @@ -405,7 +414,7 @@ public class CronetHttpURLConnection extends HttpURLConnection { |
| */ |
| void getMoreData(ByteBuffer byteBuffer) throws IOException { |
| mRequest.read(byteBuffer); |
| - mMessageLoop.loop(); |
| + mMessageLoop.loop(getReadTimeout()); |
| } |
| /** |