{
if (state() == QAbstractSocket::ConnectedState)
{
- //qDebug() << "GOING_AWAY, connection closed.";
close(WebSocketProtocol::CC_GOING_AWAY, "Connection closed");
- releaseConnections(m_pSocket);
}
+ releaseConnections(m_pSocket);
+ m_pSocket->deleteLater();
+ m_pSocket = 0;
}
/*!
WebSocketServer::~WebSocketServer()
{
+ while (!m_pendingConnections.isEmpty())
+ {
+ WebSocket *pWebSocket = m_pendingConnections.dequeue();
+ pWebSocket->close(WebSocketProtocol::CC_GOING_AWAY, "Server closed.");
+ pWebSocket->deleteLater();
+ }
m_pTcpServer->deleteLater();
}
url.setQuery(query);
pWebSocket->open(url);
spy.wait(60000);
- //pWebSocket->close();
- //delete pWebSocket;
+ pWebSocket->close();
+ delete pWebSocket;
+ pWebSocket = 0;
runTestCase(nbr + 1, total);
}
url.setQuery(query);
pWebSocket->open(url);
spy.wait(60000);
- //delete pWebSocket;
+ delete pWebSocket;
+ pWebSocket = 0;
}
DECLARE_TEST(ComplianceTest)