Skip to content

Commit e363515

Browse files
committed
null error fix
1 parent 2fcd42c commit e363515

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.github/workflows/cd.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- main
77

88
env:
9-
PACKAGE_VERSION: 7.0.2
9+
PACKAGE_VERSION: 7.0.3
1010
PACKAGE_PROJECT: https://nlib.enbiso.com
1111
PACKAGE_REPO: https://github.com/enbiso/Enbiso.NLib
1212
PACKAGE_COPYRIGHT: Copyright 2021 (c) enbiso. All rights reserved.

Enbiso.NLib.EventBus.Nats/NatsConnection.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.Collections.Generic;
23
using System.Linq;
34
using Microsoft.Extensions.Logging;
45
using Microsoft.Extensions.Options;
@@ -60,7 +61,8 @@ public void VerifyConnection()
6061

6162
policy.Execute(() =>
6263
{
63-
_logger.LogInformation("Connecting to {Servers}", string.Join(", ", _opts.Servers));
64+
var servers = _opts.Servers ?? Array.Empty<string>();
65+
_logger.LogInformation("Connecting to {Servers}", string.Join(", ", servers));
6466
_connection = _factory.CreateConnection(_opts);
6567
if (!IsConnected) return;
6668
_logger.LogInformation("Connected to NATS");

0 commit comments

Comments
 (0)