Sfoglia il codice sorgente

Fehler bei unverschlüsselten Clients behoben

Kolja Strohm 6 anni fa
parent
commit
8ae2ee71b2
1 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. 4 4
      ShopServer/ShopServer.cpp

+ 4 - 4
ShopServer/ShopServer.cpp

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