mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-04 14:56:04 +00:00
Made the server make sure there is only 1 connection
This commit is contained in:
@@ -100,7 +100,7 @@ char _getch(void) {
|
||||
|
||||
void SetupConsole() {
|
||||
error(__func__);
|
||||
#if defined(WIN32) && !defined(DEBUG)
|
||||
#if defined(WIN32) //&& !defined(DEBUG)
|
||||
DWORD outMode = 0;
|
||||
HANDLE stdoutHandle = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
if (stdoutHandle == INVALID_HANDLE_VALUE) {
|
||||
|
||||
@@ -179,9 +179,9 @@ void Identification(SOCKET TCPSock,Hold*S,RSA*Skey){
|
||||
for(auto& c : CI->Clients){
|
||||
if(c != nullptr){
|
||||
if(c->GetDID() == DID){
|
||||
// error("died on " + std::string(__func__) + ":" + std::to_string(__LINE__));
|
||||
//closesocket(c->GetTCPSock());
|
||||
//c->SetStatus(-2); ////TODO: UNCOMMENT!!
|
||||
error("died on " + std::string(__func__) + ":" + std::to_string(__LINE__));
|
||||
closesocket(c->GetTCPSock());
|
||||
c->SetStatus(-2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user