From 0b12f3650759c6cb81c400623357d636716b2934 Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 23 Sep 2020 15:52:45 +0200 Subject: [PATCH] improved close() messages/meanings in log --- src/dorkbox/network/Client.kt | 2 +- src/dorkbox/network/Server.kt | 2 +- src/dorkbox/network/connection/Connection.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dorkbox/network/Client.kt b/src/dorkbox/network/Client.kt index c91b090c..70751ec4 100644 --- a/src/dorkbox/network/Client.kt +++ b/src/dorkbox/network/Client.kt @@ -475,7 +475,7 @@ open class Client(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() diff --git a/src/dorkbox/network/Server.kt b/src/dorkbox/network/Server.kt index b3f6c4da..4ca5c0a7 100644 --- a/src/dorkbox/network/Server.kt +++ b/src/dorkbox/network/Server.kt @@ -466,7 +466,7 @@ open class Server(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) diff --git a/src/dorkbox/network/connection/Connection.kt b/src/dorkbox/network/connection/Connection.kt index 5d9dd65a..34d46f57 100644 --- a/src/dorkbox/network/connection/Connection.kt +++ b/src/dorkbox/network/connection/Connection.kt @@ -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()