Adjust logging so NATS connection closure only logs error if the error is defined.
This commit is contained in:
@@ -41,7 +41,11 @@ class NatsManager {
|
||||
|
||||
// Handle connection close events
|
||||
this.nc.closed().then((err) => {
|
||||
if (err) {
|
||||
log("ERROR", `NATS: Connection closed: ${err}`);
|
||||
} else {
|
||||
log("INFO", "NATS: Connection ended")
|
||||
}
|
||||
this.nc = null;
|
||||
this.js = null;
|
||||
this.kv = null;
|
||||
|
||||
Reference in New Issue
Block a user