From 1efe7120c49b20be51cc0cbc657125f5e38a1133 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sun, 26 Apr 2015 21:39:53 +1000 Subject: [PATCH] Use ref_client_by_id in send_client instead of open coding it --- src/connector.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/connector.c b/src/connector.c index e748808e..3e020871 100644 --- a/src/connector.c +++ b/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;