queue
marcelb 11 months ago
parent 8f2dc7d1be
commit 87088bdaa7
  1. 0
      2.test
  2. 5
      src/mysql.cpp

@ -126,7 +126,6 @@ mySQL::mySQL(const string _path, const string _username, const string _password,
for (int i=0; i<con.size() && runBot; i++) { for (int i=0; i<con.size() && runBot; i++) {
if (!con[i]->isValid()) { if (!con[i]->isValid()) {
cout << "Connection is not valid, remove it from pool!" << endl;
io.lock(); io.lock();
con.erase(con.begin()+i); con.erase(con.begin()+i);
io.unlock(); io.unlock();
@ -323,7 +322,5 @@ Connection* mySQL::shift_con() {
mySQL::~mySQL() { mySQL::~mySQL() {
runBot = false; runBot = false;
bot.get(); bot.get();
if(disconnect()) { disconnect();
throw string("[ERROR] Unable to close database ");
}
} }
Loading…
Cancel
Save