Browse Source

Drop stratifier id when client id is not found in connector

master
Con Kolivas 10 years ago
parent
commit
84ca31fcca
  1. 10
      src/connector.c

10
src/connector.c

@ -289,14 +289,19 @@ static void generator_drop_client(ckpool_t *ckp, const client_instance_t *client
free(s); free(s);
} }
static void stratifier_drop_client(ckpool_t *ckp, const client_instance_t *client) static void stratifier_drop_id(ckpool_t *ckp, const int64_t id)
{ {
char buf[256]; char buf[256];
sprintf(buf, "dropclient=%"PRId64, client->id); sprintf(buf, "dropclient=%"PRId64, id);
send_proc(ckp->stratifier, buf); send_proc(ckp->stratifier, buf);
} }
static void stratifier_drop_client(ckpool_t *ckp, const client_instance_t *client)
{
stratifier_drop_id(ckp, client->id);
}
/* Invalidate this instance. Remove them from the hashtables we look up /* Invalidate this instance. Remove them from the hashtables we look up
* regularly but keep the instances in a linked list until their ref count * regularly but keep the instances in a linked list until their ref count
* drops to zero when we can remove them lazily. Client must hold a reference * drops to zero when we can remove them lazily. Client must hold a reference
@ -681,6 +686,7 @@ static void send_client(cdata_t *cdata, int64_t id, char *buf)
invalidate_client(ckp, cdata, client); invalidate_client(ckp, cdata, client);
} else { } else {
LOGINFO("Connector failed to find client id %"PRId64" to send to", id); LOGINFO("Connector failed to find client id %"PRId64" to send to", id);
stratifier_drop_id(ckp, id);
} }
free(buf); free(buf);
return; return;

Loading…
Cancel
Save