Skip to content
This repository was archived by the owner on Feb 15, 2023. It is now read-only.

Commit a26cb55

Browse files
author
Nehmulos
committed
close the tcpServer and mark it for deletation when the QHttpServer is deleted;
1 parent e42c6d8 commit a26cb55

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/qhttpserver.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,10 @@ QHttpServer::QHttpServer(QObject *parent)
9292
// }}}
9393
}
9494

95-
QHttpServer::~QHttpServer()
96-
{
95+
QHttpServer::~QHttpServer() {
96+
close();
97+
if (m_tcpServer)
98+
m_tcpServer->deleteLater();
9799
}
98100

99101
void QHttpServer::newConnection()

0 commit comments

Comments
 (0)