Fix binlogrouter slave heartbeat task addition

The task was added multiple times when only one task is needed.
This commit is contained in:
Markus Mäkelä
2019-03-28 10:46:38 +02:00
parent f6219d1a80
commit 18cd890474
3 changed files with 5 additions and 1 deletions

View File

@ -425,8 +425,10 @@ int blr_slave_request(ROUTER_INSTANCE* router, ROUTER_SLAVE* slave, GWBUF* queue
/* Check whether to add the heartbeat check for this slave */
if (rv && slave->state == BLRS_DUMPING
&& router->send_slave_heartbeat
&& slave->heartbeat > 0)
&& slave->heartbeat > 0
&& !router->slave_heartbeat_task_active)
{
router->slave_heartbeat_task_active = true;
char task_name[BLRM_TASK_NAME_LEN + 1] = "";
snprintf(task_name,
BLRM_TASK_NAME_LEN,