mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-01 15:26:59 +00:00
Potential mod download timeout crash fix
This commit is contained in:
parent
1bee72a175
commit
529b7e2ae4
@ -83,7 +83,7 @@ private:
|
||||
std::mutex mVehicleDataMutex;
|
||||
TSetOfVehicleData mVehicleData;
|
||||
std::string mName = "Unknown Client";
|
||||
SOCKET mSocket[2] { SOCKET(-1) };
|
||||
SOCKET mSocket[2] { SOCKET(0), SOCKET(0) };
|
||||
sockaddr_in mUDPAddress {}; // is this initialization OK? yes it is
|
||||
int mUnicycleID = -1;
|
||||
std::string mRole;
|
||||
|
@ -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()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user