SQC-15_online #1

Merged
memartel_loc merged 349 commits from SQC-15_online into master 2023-12-10 17:41:26 -05:00
Showing only changes of commit 8e95899192 - Show all commits

View File

@ -17,7 +17,10 @@ Server::~Server() {
if (m_sock_udp)
closesocket(m_sock_udp);
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
WSACleanup();
#endif
@ -230,6 +233,7 @@ void Server::Log(std::string str, bool is_error = false, bool is_fatal = false)
#ifdef _WIN32
WSACleanup();
#endif
exit(-1);
}
}