Deduplicate DbConnection#Disconnect() in #Pause()

refs #8727
This commit is contained in:
Alexander A. Klimov 2021-04-20 18:42:37 +02:00
parent 0d34d8951a
commit 92df2ce2ca
3 changed files with 2 additions and 4 deletions

View File

@ -112,6 +112,8 @@ void DbConnection::Pause()
NewTransaction();
m_QueryQueue.Enqueue([this]() { Disconnect(); }, PriorityLow);
/* Work on remaining tasks but never delete the threads, for HA resuming later. */
m_QueryQueue.Join();

View File

@ -105,8 +105,6 @@ void IdoMysqlConnection::Pause()
<< "Rescheduling disconnect task.";
#endif /* I2_DEBUG */
m_QueryQueue.Enqueue([this]() { Disconnect(); }, PriorityLow);
Log(LogInformation, "IdoMysqlConnection")
<< "'" << GetName() << "' paused.";

View File

@ -104,8 +104,6 @@ void IdoPgsqlConnection::Pause()
m_ReconnectTimer.reset();
m_QueryQueue.Enqueue([this]() { Disconnect(); }, PriorityLow);
Log(LogInformation, "IdoPgsqlConnection")
<< "'" << GetName() << "' paused.";
}