Reset master DCB pointer if it is closed
If the master DBC is closed, the pointer should be set to NULL as it is used to check whether the connection is still valid.
This commit is contained in:
parent
d3a77b64c0
commit
71ca174313
@ -2404,6 +2404,10 @@ errorReply(MXS_ROUTER *instance,
|
||||
MXS_FREE(errmsg);
|
||||
}
|
||||
*succp = true;
|
||||
if (backend_dcb == router->master)
|
||||
{
|
||||
router->master = NULL;
|
||||
}
|
||||
dcb_close(backend_dcb);
|
||||
MXS_NOTICE("%s: Master %s disconnected after %ld seconds. "
|
||||
"%lu events read.",
|
||||
|
@ -425,6 +425,7 @@ void
|
||||
blr_master_close(ROUTER_INSTANCE *router)
|
||||
{
|
||||
dcb_close(router->master);
|
||||
router->master = NULL;
|
||||
router->master_state = BLRM_UNCONNECTED;
|
||||
router->master_event_state = BLR_EVENT_DONE;
|
||||
gwbuf_free(router->stored_event);
|
||||
|
Loading…
x
Reference in New Issue
Block a user