Browse Source

Use ref_client_by_id in send_client instead of open coding it

master
Con Kolivas 10 years ago
parent
commit
1efe7120c4
  1. 7
      src/connector.c

7
src/connector.c

@ -681,14 +681,9 @@ static void send_client(cdata_t *cdata, int64_t id, char *buf)
return;
}
ck_wlock(&cdata->lock);
HASH_FIND_I64(cdata->clients, &id, client);
/* Grab a reference to this client until the sender_send has
* completed processing. */
if (likely(client))
__inc_instance_ref(client);
ck_wunlock(&cdata->lock);
client = ref_client_by_id(cdata, id);
if (unlikely(!client)) {
ckpool_t *ckp = cdata->ckp;

Loading…
Cancel
Save