SQC-15_online #1
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user