mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-03 00:05:34 +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;
|
std::mutex mVehicleDataMutex;
|
||||||
TSetOfVehicleData mVehicleData;
|
TSetOfVehicleData mVehicleData;
|
||||||
std::string mName = "Unknown Client";
|
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
|
sockaddr_in mUDPAddress {}; // is this initialization OK? yes it is
|
||||||
int mUnicycleID = -1;
|
int mUnicycleID = -1;
|
||||||
std::string mRole;
|
std::string mRole;
|
||||||
|
@ -484,7 +484,12 @@ void TNetwork::ClientKick(TClient& c, const std::string& R) {
|
|||||||
// TODO handle
|
// TODO handle
|
||||||
}
|
}
|
||||||
c.SetStatus(-2);
|
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) {
|
void TNetwork::Looper(const std::weak_ptr<TClient>& c) {
|
||||||
while (!c.expired()) {
|
while (!c.expired()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user