Potential mod download timeout crash fix

This commit is contained in:
Anonymous-275
2021-04-25 19:09:08 +03:00
parent 1bee72a175
commit 529b7e2ae4
2 changed files with 7 additions and 2 deletions

View File

@@ -484,7 +484,12 @@ void TNetwork::ClientKick(TClient& c, const std::string& R) {
// TODO handle
}
c.SetStatus(-2);
CloseSocketProper(c.GetTCPSock());
if (c.GetTCPSock())
CloseSocketProper(c.GetTCPSock());
if (c.GetDownSock())
CloseSocketProper(c.GetDownSock());
}
void TNetwork::Looper(const std::weak_ptr<TClient>& c) {
while (!c.expired()) {