Browse Source

Do not grab the cdata lock in the connector when sending data as false negatives are safe

master
Con Kolivas 10 years ago
parent
commit
21c7fcb2c2
  1. 6
      src/connector.c

6
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);

Loading…
Cancel
Save