changed Server_Room::gamesMutex to QReadWriteLock

This commit is contained in:
Max-Wilhelm Bruker
2013-02-11 15:43:31 +01:00
parent 00029eeeb4
commit 7a30b827c8
7 changed files with 29 additions and 29 deletions

View File

@@ -91,7 +91,7 @@ Server_Game::Server_Game(const ServerInfo_User &_creatorInfo, int _gameId, const
Server_Game::~Server_Game()
{
room->gamesMutex.lock();
room->gamesLock.lockForWrite();
gameMutex.lock();
gameClosed = true;
@@ -107,7 +107,7 @@ Server_Game::~Server_Game()
creatorInfo = 0;
gameMutex.unlock();
room->gamesMutex.unlock();
room->gamesLock.unlock();
currentReplay->set_duration_seconds(secondsElapsed - startTimeOfThisGame);
replayList.append(currentReplay);