MXS-2889: Fix Replicator hang on shutdown
If a connection to the servers cannot be made, the replicator thread would never exit.
This commit is contained in:
@ -221,6 +221,11 @@ void Replicator::Imp::process_events()
|
||||
{
|
||||
if (!connect())
|
||||
{
|
||||
if (m_should_stop)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
// We failed to connect to any of the servers, try again in a few seconds
|
||||
std::this_thread::sleep_for(milliseconds(5000));
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user