Replaced explicit closeSession calls with dcb_close
The closeSession entry point shouldn't be called directly and dcb_close should be used instead.
This commit is contained in:

committed by
Johan Wikman

parent
49cf4089fc
commit
9a3aae64ce
@ -906,14 +906,6 @@ ROUTER_SLAVE *slave = (ROUTER_SLAVE *)router_session;
|
|||||||
|
|
||||||
/* Unlock */
|
/* Unlock */
|
||||||
rses_end_locked_router_action(slave);
|
rses_end_locked_router_action(slave);
|
||||||
|
|
||||||
/**
|
|
||||||
* Close the slave server connection
|
|
||||||
*/
|
|
||||||
if (slave->dcb != NULL) {
|
|
||||||
CHK_DCB(slave->dcb);
|
|
||||||
dcb_close(slave->dcb);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2061,14 +2061,6 @@ char read_errmsg[BINLOG_ERROR_MSG_LEN+1];
|
|||||||
|
|
||||||
if (hdr.ok == SLAVE_POS_READ_UNSAFE) {
|
if (hdr.ok == SLAVE_POS_READ_UNSAFE) {
|
||||||
|
|
||||||
ROUTER_OBJECT *router_obj;
|
|
||||||
|
|
||||||
spinlock_acquire(&router->lock);
|
|
||||||
|
|
||||||
router_obj = router->service->router;
|
|
||||||
|
|
||||||
spinlock_release(&router->lock);
|
|
||||||
|
|
||||||
MXS_ERROR("%s: Slave %s:%i, server-id %d, binlog '%s', %s",
|
MXS_ERROR("%s: Slave %s:%i, server-id %d, binlog '%s', %s",
|
||||||
router->service->name,
|
router->service->name,
|
||||||
slave->dcb->remote,
|
slave->dcb->remote,
|
||||||
@ -2081,7 +2073,7 @@ char read_errmsg[BINLOG_ERROR_MSG_LEN+1];
|
|||||||
* Close the slave session and socket
|
* Close the slave session and socket
|
||||||
* The slave will try to reconnect
|
* The slave will try to reconnect
|
||||||
*/
|
*/
|
||||||
router_obj->closeSession(router->service->router_instance, slave);
|
dcb_close(slave->dcb);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -2678,8 +2670,7 @@ blr_slave_disconnect_server(ROUTER_INSTANCE *router, ROUTER_SLAVE *slave, int se
|
|||||||
/* send server_id with disconnect state to client */
|
/* send server_id with disconnect state to client */
|
||||||
n = blr_slave_send_disconnected_server(router, slave, server_id, 1);
|
n = blr_slave_send_disconnected_server(router, slave, server_id, 1);
|
||||||
|
|
||||||
/* force session close for matched slave */
|
dcb_close(sptr->dcb);
|
||||||
router_obj->closeSession(router->service->router_instance, sptr);
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
@ -2777,8 +2768,7 @@ blr_slave_disconnect_all(ROUTER_INSTANCE *router, ROUTER_SLAVE *slave)
|
|||||||
|
|
||||||
slave->dcb->func.write(slave->dcb, pkt);
|
slave->dcb->func.write(slave->dcb, pkt);
|
||||||
|
|
||||||
/* force session close*/
|
dcb_close(sptr->dcb);
|
||||||
router_obj->closeSession(router->service->router_instance, sptr);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
sptr = sptr->next;
|
sptr = sptr->next;
|
||||||
|
Reference in New Issue
Block a user