Browse Source

Fehler bei unverschlüsselten Clients behoben

Kolja Strohm 6 years ago
parent
commit
249780b29b
1 changed files with 4 additions and 4 deletions
  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 );