Skip to content

Commit

Permalink
change Nats Health policy
Browse files Browse the repository at this point in the history
  • Loading branch information
lghinet committed Mar 22, 2022
1 parent 8195127 commit 401e8da
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/messaging/nats/nats.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,8 @@ func (n *natsStreamingPubSub) IsHealthy(ctx context.Context) healthcheck.HealthR
if n.closed ||
n.natStreamingConn == nil ||
n.natStreamingConn.NatsConn() == nil ||
n.natStreamingConn.NatsConn().Status() != nats.CONNECTED {
n.natStreamingConn.NatsConn().Status() == nats.CLOSED ||
n.natStreamingConn.NatsConn().Status() == nats.DISCONNECTED {
return healthcheck.HealthResult{
Status: healthcheck.Unhealthy,
Description: "nats pubsub connection is closed",
Expand Down

0 comments on commit 401e8da

Please sign in to comment.