mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 16:44:48 -07:00
server crash fixes
This commit is contained in:
parent
4f97db62d7
commit
c65f327e71
7 changed files with 20 additions and 6 deletions
|
|
@ -140,7 +140,7 @@ AuthenticationResult Server::loginUser(Server_ProtocolHandler *session, QString
|
|||
}
|
||||
|
||||
users.insert(name, session);
|
||||
qDebug() << "Server::loginUser: name=" << name;
|
||||
qDebug() << "Server::loginUser:" << session << "name=" << name;
|
||||
|
||||
data.set_session_id(databaseInterface->startSession(name, session->getAddress()));
|
||||
databaseInterface->unlockSessionTables();
|
||||
|
|
@ -228,7 +228,7 @@ void Server::removeClient(Server_ProtocolHandler *client)
|
|||
qDebug() << "closed session id:" << sessionId;
|
||||
}
|
||||
}
|
||||
qDebug() << "Server::removeClient:" << clients.size() << "clients; " << users.size() << "users left";
|
||||
qDebug() << "Server::removeClient: removed" << (void *) client << ";" << clients.size() << "clients; " << users.size() << "users left";
|
||||
}
|
||||
|
||||
void Server::externalUserJoined(const ServerInfo_User &userInfo)
|
||||
|
|
|
|||
|
|
@ -277,6 +277,10 @@ Response::ResponseCode Server_ProtocolHandler::processAdminCommandContainer(cons
|
|||
|
||||
void Server_ProtocolHandler::processCommandContainer(const CommandContainer &cont)
|
||||
{
|
||||
// Command processing must be disabled after prepareDestroy() has been called.
|
||||
if (deleted)
|
||||
return;
|
||||
|
||||
lastDataReceived = timeRunning;
|
||||
|
||||
ResponseContainer responseContainer(cont.has_cmd_id() ? cont.cmd_id() : -1);
|
||||
|
|
|
|||
|
|
@ -26,8 +26,7 @@ ServerInfo_User_Container::~ServerInfo_User_Container()
|
|||
|
||||
void ServerInfo_User_Container::setUserInfo(const ServerInfo_User &_userInfo)
|
||||
{
|
||||
userInfo = new ServerInfo_User;
|
||||
userInfo->CopyFrom(_userInfo);
|
||||
userInfo = new ServerInfo_User(_userInfo);
|
||||
}
|
||||
|
||||
ServerInfo_User &ServerInfo_User_Container::copyUserInfo(ServerInfo_User &result, bool complete, bool internalInfo, bool sessionInfo) const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue