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