File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
main/java/com/google/firebase/remoteconfig/internal
test/java/com/google/firebase/remoteconfig Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ public class ConfigAutoFetch {
5454 private final ConfigUpdateListener retryCallback ;
5555 private final ScheduledExecutorService scheduledExecutorService ;
5656 private final Random random ;
57- private Boolean isInBackground ;
57+ private boolean isInBackground ;
5858
5959 public ConfigAutoFetch (
6060 HttpURLConnection httpURLConnection ,
@@ -204,6 +204,8 @@ private void handleNotifications(InputStream inputStream) throws IOException {
204204 currentConfigUpdateMessage = "" ;
205205 }
206206 }
207+
208+ reader .close ();
207209 }
208210
209211 private void autoFetch (int remainingAttempts , long targetVersion ) {
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ public class ConfigRealtimeHttpClient {
9898 private boolean isRealtimeDisabled ;
9999
100100 /** Flag to indicate whether or not the app is in the background or not. */
101- private Boolean isInBackground ;
101+ private boolean isInBackground ;
102102
103103 // The HttpUrlConnection and auto-fetcher for this client. Only one of each exist at a time.
104104 private HttpURLConnection httpURLConnection ;
Original file line number Diff line number Diff line change @@ -1288,7 +1288,7 @@ public void realtime_stream_listen_and_end_connection() throws Exception {
12881288 .thenReturn (Tasks .forResult (realtimeFetchedContainerResponse ));
12891289 configAutoFetch .listenForNotifications ();
12901290
1291- verify (inputStreamSpy , times (1 )).close ();
1291+ verify (inputStreamSpy , times (2 )).close ();
12921292 }
12931293
12941294 @ Test
You can’t perform that action at this time.
0 commit comments