From 873f7603c5a213b0db58fa3c29d9e733f31366c8 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Fri, 11 Apr 2014 09:15:56 +0200 Subject: [PATCH] Frontend: Improve debug log when destroying a connection. The file-descriptor associated with the connection might not be open any more and, thus, be -1. Instead of using that in the message, use the connection's object name which includes the file-descriptor as used when accepting the connection. --- src/frontend/connection.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/frontend/connection.c b/src/frontend/connection.c index 1fa4ba9..b98987d 100644 --- a/src/frontend/connection.c +++ b/src/frontend/connection.c @@ -140,8 +140,7 @@ connection_destroy(sdb_object_t *obj) "(%zu byte%s left in buffer)", len, len == 1 ? "" : "s"); } - sdb_log(SDB_LOG_DEBUG, "frontend: Closing connection on fd=%i", - conn->fd); + sdb_log(SDB_LOG_DEBUG, "frontend: Closing connection %s", obj->name); if (conn->fd >= 0) close(conn->fd); conn->fd = -1; -- 2.30.2