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 (!connect())
|
||||||
{
|
{
|
||||||
|
if (m_should_stop)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
// We failed to connect to any of the servers, try again in a few seconds
|
// We failed to connect to any of the servers, try again in a few seconds
|
||||||
std::this_thread::sleep_for(milliseconds(5000));
|
std::this_thread::sleep_for(milliseconds(5000));
|
||||||
continue;
|
continue;
|
||||||
|
Reference in New Issue
Block a user