more mutexes

This commit is contained in:
Max-Wilhelm Bruker
2011-03-22 22:46:15 +01:00
parent 51269f4b91
commit eca941201d
5 changed files with 16 additions and 4 deletions

View File

@@ -58,12 +58,17 @@ ServerSocketInterface::ServerSocketInterface(Servatrice *_server, QTcpSocket *_s
ServerSocketInterface::~ServerSocketInterface()
{
QMutexLocker locker(&servatrice->serverMutex);
logger->logMessage("ServerSocketInterface destructor");
flushXmlBuffer();
delete xmlWriter;
delete xmlReader;
delete socket;
socket = 0;
// This call has to stay here so that the mutex is not freed prematurely.
server->removeClient(this);
}
void ServerSocketInterface::processProtocolItem(ProtocolItem *item)