File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
firebase-sessions/src/main/kotlin/com/google/firebase/sessions/settings Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -46,12 +46,12 @@ internal class RemoteSettingsFetcher(
46
46
onFailure : suspend (String ) -> Unit
47
47
) =
48
48
withContext(blockingDispatcher) {
49
- val connection = settingsUrl().openConnection() as HttpsURLConnection
50
- connection.requestMethod = " GET"
51
- connection.setRequestProperty(" Accept" , " application/json" )
52
- headerOptions.forEach { connection.setRequestProperty(it.key, it.value) }
53
-
54
49
try {
50
+ val connection = settingsUrl().openConnection() as HttpsURLConnection
51
+ connection.requestMethod = " GET"
52
+ connection.setRequestProperty(" Accept" , " application/json" )
53
+ headerOptions.forEach { connection.setRequestProperty(it.key, it.value) }
54
+
55
55
val responseCode = connection.responseCode
56
56
if (responseCode == HttpsURLConnection .HTTP_OK ) {
57
57
val inputStream = connection.inputStream
You can’t perform that action at this time.
0 commit comments