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 d420512f197629930ca7757076209938b3b743eb..5165c9ff2d9b0e4d07f76e5610dd068d32927481 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 |
@@ -469,13 +469,13 @@ public class CronetHttpURLConnection extends HttpURLConnection { |
} |
mResponseInfo = info; |
mRequest.cancel(); |
- setResponseDataCompleted(null); |
+ setRequestCompleted(null); |
} |
@Override |
public void onSucceeded(UrlRequest request, UrlResponseInfo info) { |
mResponseInfo = info; |
- setResponseDataCompleted(null); |
+ setRequestCompleted(null); |
} |
@Override |
@@ -487,13 +487,13 @@ public class CronetHttpURLConnection extends HttpURLConnection { |
} |
mResponseInfo = info; |
mException = exception; |
- setResponseDataCompleted(mException); |
+ setRequestCompleted(mException); |
} |
@Override |
public void onCanceled(UrlRequest request, UrlResponseInfo info) { |
mResponseInfo = info; |
- setResponseDataCompleted(new IOException("stream closed")); |
+ setRequestCompleted(new IOException("stream closed")); |
} |
/** |
@@ -502,10 +502,13 @@ public class CronetHttpURLConnection extends HttpURLConnection { |
* @param exception if not {@code null}, it is the exception to report when |
* caller tries to read more data. |
*/ |
- private void setResponseDataCompleted(IOException exception) { |
+ private void setRequestCompleted(IOException exception) { |
mef
2016/07/08 17:42:06
Why the rename? Can you update the comment?
xunjieli
2016/07/08 17:56:26
Done. I think it is not neccessary to change it,
|
if (mInputStream != null) { |
mInputStream.setResponseDataCompleted(exception); |
} |
+ if (mOutputStream != null) { |
+ mOutputStream.setRequestCompleted(exception); |
+ } |
mMessageLoop.quit(); |
} |
} |