MXS-2468 When the URLs change, HTTP GET must be cancelled
If the nodes change while a multi HTTP GET is in process, the corresponding delayed called must be cancelled. Otherwise we eventually would end up attempting to update the state of the nodes using the wrong result.
This commit is contained in:
parent
5ab0876a5f
commit
86b099b487
@ -925,7 +925,18 @@ void ClustrixMonitor::update_http_urls()
|
||||
health_urls.push_back(url);
|
||||
}
|
||||
|
||||
m_health_urls.swap(health_urls);
|
||||
if (m_health_urls != health_urls)
|
||||
{
|
||||
if (m_delayed_http_check_id != 0)
|
||||
{
|
||||
cancel_delayed_call(m_delayed_http_check_id);
|
||||
m_delayed_http_check_id = 0;
|
||||
}
|
||||
|
||||
m_http.reset();
|
||||
|
||||
m_health_urls.swap(health_urls);
|
||||
}
|
||||
}
|
||||
|
||||
bool ClustrixMonitor::perform_softfail(SERVER* pServer, json_t** ppError)
|
||||
|
Loading…
x
Reference in New Issue
Block a user