]> code.citadel.org Git - citadel.git/blobdiff - citadel/context.c
Generate wiki diffs using a temp file instead of a big string of realloc() calls.
[citadel.git] / citadel / context.c
index fa2946cafcc43ec0f7596a646664aa18bce90d0d..c77f3cdd2b007eb4fa8c5425ef3b0c63a1d3d16e 100644 (file)
@@ -359,11 +359,11 @@ 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.
+        * if the socket is 0 or -1, its already gone or was never there.
         */
-       if (con->client_socket != 0)
+       if (con->client_socket > 0)
        {
-               CtdlLogPrintf(CTDL_DEBUG, "Closing socket %d\n", con->client_socket);
+               syslog(LOG_NOTICE, "Closing socket %d\n", con->client_socket);
                close(con->client_socket);
        }