提交 7d131f26 编写于 作者: mahuifa's avatar mahuifa

保存

上级 813edeca
......@@ -50,10 +50,7 @@ void TCPServer::on_newConnection()
{
while (m_tcpServer->hasPendingConnections())
{
qDebug() <<m_tcpServer->hasPendingConnections();
QTcpSocket* tcpSocket = m_tcpServer->nextPendingConnection(); // 存在内存泄漏,最好使用时通过hasPendingConnections判断是否有未返回的连接
qDebug() <<m_tcpServer->hasPendingConnections();
if(tcpSocket)
{
m_tcpClients.append(tcpSocket);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册