Binlog server: force fake Client DCB close in errorReply
Binlog server: force fake Client DCB close in errorReply. This fixes an issue when START SLAVE, with new config, is called after a previous one with errors.
This commit is contained in:
parent
2da7a93473
commit
4c5f0d184c
@ -2405,6 +2405,13 @@ errorReply(MXS_ROUTER *instance,
|
||||
/* Force backend DCB close */
|
||||
dcb_close(backend_dcb);
|
||||
|
||||
/* Force Fake Client DCB close */
|
||||
if (router->client)
|
||||
{
|
||||
dcb_close(router->client);
|
||||
router->client = NULL;
|
||||
}
|
||||
|
||||
MXS_ERROR("%s: Master connection error %lu '%s' in state '%s', "
|
||||
"%s while connecting to master [%s]:%d. Replication is stopped.",
|
||||
router->service->name, router->m_errno, router->m_errmsg,
|
||||
@ -2472,11 +2479,21 @@ errorReply(MXS_ROUTER *instance,
|
||||
MXS_FREE(errmsg);
|
||||
}
|
||||
*succp = true;
|
||||
|
||||
/* Force Backend DCB close */
|
||||
if (backend_dcb == router->master)
|
||||
{
|
||||
router->master = NULL;
|
||||
}
|
||||
dcb_close(backend_dcb);
|
||||
|
||||
/* Force Fake Client DCB close */
|
||||
if (router->client)
|
||||
{
|
||||
dcb_close(router->client);
|
||||
router->client = NULL;
|
||||
}
|
||||
|
||||
MXS_NOTICE("%s: Master %s disconnected after %ld seconds. "
|
||||
"%lu events read.",
|
||||
router->service->name, router->service->dbref->server->name,
|
||||
|
Loading…
x
Reference in New Issue
Block a user