mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
race condition fixed
This commit is contained in:
parent
091a2ed6b2
commit
7ae0e31964
7 changed files with 3 additions and 15 deletions
|
|
@ -30,7 +30,6 @@
|
|||
void Servatrice_TcpServer::incomingConnection(int socketDescriptor)
|
||||
{
|
||||
ServerSocketThread *sst = new ServerSocketThread(socketDescriptor, server, this);
|
||||
connect(sst, SIGNAL(clientAdded(ServerSocketInterface *)), this, SIGNAL(clientAdded(ServerSocketInterface *)));
|
||||
sst->start();
|
||||
}
|
||||
|
||||
|
|
@ -57,7 +56,6 @@ Servatrice::Servatrice(QSettings *_settings, QObject *parent)
|
|||
}
|
||||
|
||||
tcpServer = new Servatrice_TcpServer(this);
|
||||
connect(tcpServer, SIGNAL(clientAdded(ServerSocketInterface *)), this, SLOT(newConnection(ServerSocketInterface *)));
|
||||
int port = settings->value("server/port", 4747).toInt();
|
||||
qDebug() << "Starting server on port" << port;
|
||||
tcpServer->listen(QHostAddress::Any, port);
|
||||
|
|
@ -154,11 +152,6 @@ bool Servatrice::execSqlQuery(QSqlQuery &query)
|
|||
return false;
|
||||
}
|
||||
|
||||
void Servatrice::newConnection(ServerSocketInterface *client)
|
||||
{
|
||||
addClient(client);
|
||||
}
|
||||
|
||||
AuthenticationResult Servatrice::checkUserPassword(const QString &user, const QString &password)
|
||||
{
|
||||
QMutexLocker locker(&dbMutex);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue