Skip to content

Commit

Permalink
fix: Fix Crash when using an invalid Databroker IP
Browse files Browse the repository at this point in the history
e.g. when using 10.0.23 instead of 10.0.0.23
  • Loading branch information
wba2hi committed Feb 13, 2024
1 parent 3553d55 commit fc790f6
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,14 @@ class DataBrokerConnectorFactory {
connectionInfo: ConnectionInfo,
): DataBrokerConnector {
val isTlsEnabled = connectionInfo.isTlsEnabled
return if (isTlsEnabled) {
createSecureConnector(context, connectionInfo)
} else {
createInsecureConnector(connectionInfo)
try {
return if (isTlsEnabled) {
createSecureConnector(context, connectionInfo)
} else {
createInsecureConnector(connectionInfo)
}
} catch (e: IllegalArgumentException) {
throw DataBrokerException("Can't establish connection to Databroker", e)
}
}

Expand Down

0 comments on commit fc790f6

Please sign in to comment.