improved close() messages/meanings in log

This commit is contained in:
nathan 2020-09-23 15:52:45 +02:00
parent a4ccbd4b6a
commit 0b12f36507
3 changed files with 3 additions and 3 deletions

View File

@ -475,7 +475,7 @@ open class Client<CONNECTION : Connection>(config: Configuration = Configuration
while (!isShutdown()) {
if (newConnection.isClosed()) {
// If the connection has either been closed, or has expired, it needs to be cleaned-up/deleted.
logger.debug {"[${newConnection.id}] connection closed"}
logger.debug {"[${newConnection.id}] connection expired"}
// NOTE: We do not shutdown the client!! The client is only closed by explicitly calling `client.close()`
newConnection.close()

View File

@ -466,7 +466,7 @@ open class Server<CONNECTION : Connection>(config: ServerConfiguration = ServerC
connections.forEach { connection ->
if (connection.isClosed()) {
// If the connection has either been closed, or has expired, it needs to be cleaned-up/deleted.
logger.debug { "[${connection.id}] connection closed" }
logger.debug { "[${connection.id}] connection expired" }
// have to free up resources!
handshake.cleanup(connection)

View File

@ -317,7 +317,7 @@ open class Connection(connectionParameters: ConnectionParams<*>) {
// the server 'handshake' connection info is cleaned up with the disconnect via timeout/expire.
if (isClosed.compareAndSet(expect = false, update = true)) {
logger.info {"[$id] closed connection"}
logger.info {"[$id] connection closed"}
subscription.close()