Skip to content

Commit 9a06034

Browse files
committed
fallback to default settings, not null
1 parent 681920d commit 9a06034

File tree

1 file changed

+2
-1
lines changed
  • core/src/main/java/com/segment/analytics/kotlin/core

1 file changed

+2
-1
lines changed

core/src/main/java/com/segment/analytics/kotlin/core/Settings.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ internal fun Analytics.fetchSettings(
112112
val connection = HTTPClient(writeKey, this.configuration.requestFactory).settings(cdnHost)
113113
val settingsString =
114114
connection.inputStream?.bufferedReader()?.use(BufferedReader::readText) ?: ""
115+
//configuration.defaultSettings = LenientJson.decodeFromString(settingsString)
115116
log("Fetched Settings: $settingsString")
116117
LenientJson.decodeFromString(settingsString)
117118
} catch (ex: Exception) {
@@ -121,5 +122,5 @@ internal fun Analytics.fetchSettings(
121122
it["writekey"] = writeKey
122123
it["message"] = "Error retrieving settings"
123124
}
124-
null
125+
configuration.defaultSettings
125126
}

0 commit comments

Comments
 (0)