Made the server make sure there is only 1 connection

This commit is contained in:
Anonymous275
2020-11-12 01:40:26 +02:00
parent 308500c01f
commit cdb2624367
2 changed files with 4 additions and 4 deletions

View File

@@ -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) {

View File

@@ -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;
}
}