MCPcopy Create free account
hub / github.com/Atarity/Lightpack / clientDisconnected

Method clientDisconnected

Software/src/ApiServer.cpp:250–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

248}
249
250void ApiServer::clientDisconnected()
251{
252 QTcpSocket *client = dynamic_cast<QTcpSocket*>(sender());
253
254 DEBUG_LOW_LEVEL << "Client disconnected:" << client->peerAddress().toString();
255
256 QString sessionKey = m_clients[client].sessionKey;
257 if (lightpack->CheckLock(sessionKey)==1)
258 lightpack->UnLock(sessionKey);
259
260 m_clients.remove(client);
261
262 disconnect(client, SIGNAL(readyRead()), this, SLOT(clientProcessCommands()));
263 disconnect(client, SIGNAL(disconnected()), this, SLOT(clientDisconnected()));
264
265 client->deleteLater();
266}
267
268void ApiServer::clientProcessCommands()
269{

Callers

nothing calls this directly

Calls 3

CheckLockMethod · 0.80
removeMethod · 0.80
UnLockMethod · 0.45

Tested by

no test coverage detected