Преглед на файлове

Fehler bei unverschlüsselten Clients behoben

Kolja Strohm преди 6 години
родител
ревизия
249780b29b
променени са 1 файла, в които са добавени 4 реда и са изтрити 4 реда
  1. 4 4
      Minigame Server/MinigameServer.cpp

+ 4 - 4
Minigame Server/MinigameServer.cpp

@@ -59,7 +59,7 @@ MinigameServer::~MinigameServer()
 // nicht constant 
 void MinigameServer::runn()
 {
-    while( !end )
+    while( !end && aServer->isConnected() )
     {
         SSLSKlient *klient;
         klient = aServer->getKlient();
@@ -71,7 +71,7 @@ void MinigameServer::runn()
             return;
         }
         if( !klient )
-            return;
+            continue;
         MSAKlient *clHandle = new MSAKlient( klient, getThis() );
         clHandle->start();
     }
@@ -79,12 +79,12 @@ void MinigameServer::runn()
 
 void MinigameServer::thread()
 {
-    while( 1 )
+    while( server->isConnected() )
     {
         SKlient *klient;
         klient = server->getKlient();
         if( !klient )
-            break;
+            continue;
         Framework::getThreadRegister()->cleanUpClosedThreads();
         MSKlient *clHandle = new MSKlient( klient, getThis() );
         EnterCriticalSection( &cs );