mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-10 20:13:24 -08:00
Servatrice_ConnectionPool stored and returned a concrete Servatrice_DatabaseInterface pointer, so the pool that decides which database a socket handler runs against could not hold any other Server_DatabaseInterface. Retype the constructor, member and accessor, and include the interface header instead of the Servatrice one. The shipped path still builds MySQL pools and converts implicitly; behaviour is unchanged.
16 lines
394 B
C++
16 lines
394 B
C++
#include "servatrice_connection_pool.h"
|
|
|
|
#include "server_database_interface.h"
|
|
|
|
#include <QThread>
|
|
|
|
Servatrice_ConnectionPool::Servatrice_ConnectionPool(Server_DatabaseInterface *_databaseInterface)
|
|
: databaseInterface(_databaseInterface), threaded(false), clientCount(0)
|
|
{
|
|
}
|
|
|
|
Servatrice_ConnectionPool::~Servatrice_ConnectionPool()
|
|
{
|
|
delete databaseInterface;
|
|
thread()->quit();
|
|
}
|