mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Fix shutdown crash
Fixed crash due to destructor of CSocketCreator being called during shutdown. If the socket fails to close, an error is logged. But at this point, all sockets have been closed already and the logger system has already been destroyed. Allocated as dynamic memory to avoid destructor being called at this stage.
This commit is contained in:
parent
1eef4aacb4
commit
615de70b1f
@ -200,8 +200,8 @@ bool CRConClient::IsConnected(void)
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
CRConClient g_RCONClient;
|
||||
CRConClient* g_RCONClient(new CRConClient());
|
||||
CRConClient* RCONClient() // Singleton RCON Client.
|
||||
{
|
||||
return &g_RCONClient;
|
||||
return g_RCONClient;
|
||||
}
|
||||
|
@ -614,8 +614,8 @@ int CRConServer::GetAuthenticatedCount(void) const
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
CRConServer g_RCONServer;
|
||||
CRConServer* g_RCONServer(new CRConServer());
|
||||
CRConServer* RCONServer() // Singleton RCON Server.
|
||||
{
|
||||
return &g_RCONServer;
|
||||
return g_RCONServer;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user