diff --git a/server/modules/routing/binlog/blr_slave.c b/server/modules/routing/binlog/blr_slave.c index 83d0bc1a7..c6b851904 100644 --- a/server/modules/routing/binlog/blr_slave.c +++ b/server/modules/routing/binlog/blr_slave.c @@ -876,10 +876,16 @@ blr_slave_query(ROUTER_INSTANCE *router, ROUTER_SLAVE *slave, GWBUF *queue) spinlock_acquire(&router->lock); + /* Set the BLRM_UNCONFIGURED state */ router->master_state = BLRM_UNCONFIGURED; blr_master_set_empty_config(router); blr_master_free_config(current_master); + /* Remove any error message and errno */ + MXS_FREE(router->m_errmsg); + router->m_errmsg = NULL; + router->m_errno = 0; + spinlock_release(&router->lock); if (removed_cfg == -1)