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