mirror of
https://github.com/sogou/workflow.git
synced 2026-10-29 03:27:04 +08:00
[MySQL] reset target's state when disconnected by user
This commit is contained in:
@@ -603,11 +603,14 @@ bool ComplexMySQLTask::finish_once()
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this->is_fixed_addr() && this->state != WFT_STATE_SUCCESS)
|
||||
if (this->is_fixed_addr())
|
||||
{
|
||||
auto *target = (RouteManager::RouteTarget *)this->get_target();
|
||||
if (target)
|
||||
target->state = 0;
|
||||
if (this->state != WFT_STATE_SUCCESS || this->keep_alive_timeo == 0)
|
||||
{
|
||||
auto *target = (RouteManager::RouteTarget *)this->get_target();
|
||||
if (target)
|
||||
target->state = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user