Skip to content

Commit 0c96b00

Browse files
committed
Change responseCode var to Integer and initialize to null
1 parent 55742a8 commit 0c96b00

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

firebase-config/src/main/java/com/google/firebase/remoteconfig/internal/ConfigRealtimeHttpClient.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ public synchronized void beginRealtimeHttpStream() {
329329
return;
330330
}
331331

332-
int responseCode = 0;
332+
Integer responseCode = null;
333333
try {
334334
// Create the open the connection.
335335
httpURLConnection = createRealtimeConnection();
@@ -349,8 +349,9 @@ public synchronized void beginRealtimeHttpStream() {
349349
} finally {
350350
closeRealtimeHttpStream();
351351

352-
// If responseCode is 0 then no connection was made to server and the SDK should still retry.
353-
if (responseCode == 0
352+
// If responseCode is null then no connection was made to server and the SDK should still
353+
// retry.
354+
if (responseCode == null
354355
|| responseCode == HttpURLConnection.HTTP_OK
355356
|| isStatusCodeRetryable(responseCode)) {
356357
retryHTTPConnection();

0 commit comments

Comments
 (0)