Эх сурвалжийг харах

Fehler bei unverschlüsselten Clients behoben

Kolja Strohm 6 жил өмнө
parent
commit
492310ef70

+ 4 - 4
PatchServer/PatchServer.cpp

@@ -69,7 +69,7 @@ PatchServer::~PatchServer()
 // nicht constant 
 void PatchServer::runn()
 {
-    while( !end )
+    while( !end && aServer->isConnected() )
     {
         SSLSKlient *klient;
         klient = aServer->getKlient();
@@ -81,7 +81,7 @@ void PatchServer::runn()
             return;
         }
         if( !klient )
-            return;
+            continue;
         PSAKlient *clHandle = new PSAKlient( klient, getThis(), ini->getThis() );
         clHandle->start();
     }
@@ -89,12 +89,12 @@ void PatchServer::runn()
 
 void PatchServer::thread()
 {
-    while( 1 )
+    while( server->isConnected() )
     {
         SKlient *klient;
         klient = server->getKlient();
         if( !klient )
-            break;
+            continue;
 		Framework::getThreadRegister()->cleanUpClosedThreads();
         PSKlient *clHandle = new PSKlient( klient, getThis(), ini->getThis() );
         EnterCriticalSection( &cs );