Skip to content

Commit

Permalink
Prevent an exception when no Elasticsearch port provided (#14887)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeAlhayek authored Dec 12, 2023
1 parent 6dc4f98 commit 1469439
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ private static bool CheckOptions(ElasticConnectionOptions elasticConnectionOptio
optionsAreValid = false;
}

if (elasticConnectionOptions.Ports.Length == 0)
if (elasticConnectionOptions.Ports?.Length == 0)
{
logger.LogError("Elasticsearch is enabled but not active because a port is missing in application configuration.");
optionsAreValid = false;
Expand Down

0 comments on commit 1469439

Please sign in to comment.