just log the close if we're realy going to close.
[citadel.git] / citadel / context.c
index e6547417a991c0d3d5ef6821e30617711516e12f..fbb3272de460ffac9d503340181c67ad1eadc3fe 100644 (file)
@@ -354,9 +354,9 @@ void RemoveContext (CitContext *con)
         * If the client is still connected, blow 'em away. 
         * if the socket is 0, its already gone or was never there.
         */
-       CtdlLogPrintf(CTDL_DEBUG, "Closing socket %d\n", con->client_socket);
        if (con->client_socket != 0)
        {
+               CtdlLogPrintf(CTDL_DEBUG, "Closing socket %d\n", con->client_socket);
                close(con->client_socket);
        }