erratum II
This commit is contained in:
parent
8870550512
commit
8e95899192
@ -18,6 +18,9 @@ Server::~Server() {
|
|||||||
closesocket(m_sock_udp);
|
closesocket(m_sock_udp);
|
||||||
if (m_sock_tcp)
|
if (m_sock_tcp)
|
||||||
closesocket(m_sock_tcp);
|
closesocket(m_sock_tcp);
|
||||||
|
for (const auto& [key, player] : m_players)
|
||||||
|
closesocket(player->getSock());
|
||||||
|
m_players.clear();
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
WSACleanup();
|
WSACleanup();
|
||||||
#endif
|
#endif
|
||||||
@ -230,6 +233,7 @@ void Server::Log(std::string str, bool is_error = false, bool is_fatal = false)
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
WSACleanup();
|
WSACleanup();
|
||||||
#endif
|
#endif
|
||||||
|
exit(-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user