join thread before cleanup
This commit is contained in:
@@ -171,6 +171,7 @@ Network::Network(const bool local, const uint16_t port, const uint16_t httpPort,
|
|||||||
Network::~Network()
|
Network::~Network()
|
||||||
{
|
{
|
||||||
stop();
|
stop();
|
||||||
|
join();
|
||||||
|
|
||||||
while (!m_connections.empty()) {
|
while (!m_connections.empty()) {
|
||||||
Connection* connection = m_connections.back();
|
Connection* connection = m_connections.back();
|
||||||
@@ -179,7 +180,6 @@ Network::~Network()
|
|||||||
connection->join();
|
connection->join();
|
||||||
delete connection;
|
delete connection;
|
||||||
}
|
}
|
||||||
join();
|
|
||||||
|
|
||||||
if (m_tcpServer != NULL) {
|
if (m_tcpServer != NULL) {
|
||||||
delete m_tcpServer;
|
delete m_tcpServer;
|
||||||
|
|||||||
Reference in New Issue
Block a user