If there are multiple servers labeled as master and the current master is down, a second connection to a different server that's a master is opened. The m_current_master variable isn't updated to reflect the new situation.
This is only a problem when the fix to
MXS-3934 is in use. There it can cause a failing session command to be rapidly executed as the "new" master server is classified as a slave server. This in turn causes a failure to retry a session command.