From 21c7fcb2c2d9adee5f4638d67cbfb1fd72cba76b Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Tue, 27 Jan 2015 19:57:34 +1100 Subject: [PATCH] Do not grab the cdata lock in the connector when sending data as false negatives are safe --- src/connector.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/connector.c b/src/connector.c index f47e30b0..f1679362 100644 --- a/src/connector.c +++ b/src/connector.c @@ -352,15 +352,15 @@ reparse: json_object_set_new_nocheck(val, "server", json_integer(client->server)); s = json_dumps(val, 0); - ck_rlock(&cdata->lock); - /* Do not send messages of clients we've already dropped */ + /* Do not send messages of clients we've already dropped. We + * do this unlocked as the occasional false negative can be + * filtered by the stratifier. */ if (likely(client->fd != -1)) { if (ckp->passthrough) send_proc(ckp->generator, s); else send_proc(ckp->stratifier, s); } - ck_runlock(&cdata->lock); free(s); json_decref(val);