join after connections were closed

This commit is contained in:
john30
2017-01-08 12:06:12 +01:00
parent 39c7678406
commit 42a5d1d0c3
+2 -2
View File
@@ -170,8 +170,7 @@ Network::Network(const bool local, const uint16_t port, const uint16_t httpPort,
Network::~Network() Network::~Network()
{ {
join(); stop();
while (!m_connections.empty()) { while (!m_connections.empty()) {
Connection* connection = m_connections.back(); Connection* connection = m_connections.back();
m_connections.pop_back(); m_connections.pop_back();
@@ -186,6 +185,7 @@ Network::~Network()
if (m_httpServer != NULL) { if (m_httpServer != NULL) {
delete m_httpServer; delete m_httpServer;
} }
join();
} }
void Network::run() void Network::run()