Resolve issue with icorrectly markign slave connection as errored

This commit is contained in:
Mark Riddoch
2014-10-21 14:31:05 +01:00
parent 554a054e18
commit 932fc5dc2c
5 changed files with 61 additions and 6 deletions

View File

@ -138,6 +138,7 @@ blr_restart_master(ROUTER_INSTANCE *router)
GWBUF *ptr;
dcb_close(router->master);
dcb_close(router->client);
dcb_free(router->master);
dcb_free(router->client);
@ -1069,3 +1070,16 @@ int i;
skygw_log_write_flush(file, "%s", buf);
}
/**
* Check if the master connection is in place and we
* are downlaoding binlogs
*
* @param router The router instance
* @return non-zero if we are recivign binlog records
*/
int
blr_master_connected(ROUTER_INSTANCE *router)
{
return router->master_state == BLRM_BINLOGDUMP;
}