From 1e40c5074f1e15ff9eac6cc26203af51ba8fead6 Mon Sep 17 00:00:00 2001 From: owlishDeveloper Date: Mon, 4 Jan 2021 19:28:36 +0000 Subject: [PATCH] Bug 1683160 - Add a note on WebResponse.body to documentation r=geckoview-reviewers,agi Differential Revision: https://phabricator.services.mozilla.com/D100704 --- .../src/main/java/org/mozilla/geckoview/WebResponse.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebResponse.java b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebResponse.java index 9d792e937e9b..dbc981b5fd16 100644 --- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebResponse.java +++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebResponse.java @@ -53,6 +53,9 @@ public class WebResponse extends WebMessage { /** * An {@link InputStream} containing the response body, if available. + * Attention: the stream must be closed whenever the app is done with it, + * even when the body is ignored. + * Otherwise the connection will not be closed until the stream is garbage collected */ public final @Nullable InputStream body;