Skip to content

Commit

Permalink
correct nats sigterm note
Browse files Browse the repository at this point in the history
  • Loading branch information
rsafonseca committed Sep 9, 2024
1 parent 8669cab commit 4cfefdb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cpp-lib/src/pitaya/nats_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ NatsClientImpl::ClosedCb(natsConnection* nc, void* user)
instance->_log->info("nats connection closed!");
instance->_connClosed = true;
if (!instance->_shuttingDown) {
// Already shutting down, no need to send SIGTERM
// This was not initiated by a shutdown request.
// Send SIGTERM as this was caused by all reconnection attempts failing
std::thread(std::bind(raise, SIGTERM)).detach();
}
}
Expand Down

0 comments on commit 4cfefdb

Please sign in to comment.