mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-15 02:30:40 -07:00
Merge pull request #1447 from nats-io/fix_conn_close_trace
Removed double connection close trace
This commit is contained in:
@@ -1283,7 +1283,7 @@ func (c *client) markConnAsClosed(reason ClosedState) bool {
|
||||
if c.srv != nil {
|
||||
if c.kind == ROUTER || c.kind == GATEWAY {
|
||||
c.Noticef("%s connection closed: %s", c.typeString(), reason)
|
||||
} else { // Client and Leaf Node connections.
|
||||
} else { // Client, System, Jetstream, Account and Leafnode connections.
|
||||
c.Debugf("%s connection closed: %s", c.typeString(), reason)
|
||||
}
|
||||
}
|
||||
@@ -3880,16 +3880,6 @@ func (c *client) closeConnection(reason ClosedState) {
|
||||
func (c *client) teardownConn() {
|
||||
c.mu.Lock()
|
||||
|
||||
// Be consistent with the creation: for routes and gateways,
|
||||
// we use Noticef on create, so use that too for delete.
|
||||
if c.srv != nil {
|
||||
if c.kind == ROUTER || c.kind == GATEWAY {
|
||||
c.Noticef("%s connection closed", c.typeString())
|
||||
} else { // Client, System, Jetstream, Account and Leafnode connections.
|
||||
c.Debugf("%s connection closed", c.typeString())
|
||||
}
|
||||
}
|
||||
|
||||
c.clearAuthTimer()
|
||||
c.clearPingTimer()
|
||||
// Unblock anyone who is potentially stalled waiting on us.
|
||||
|
||||
Reference in New Issue
Block a user