浏览代码

Fehler bei unverschlüsselten Clients behoben

Kolja Strohm 6 年之前
父节点
当前提交
8ae2ee71b2
共有 1 个文件被更改,包括 4 次插入4 次删除
  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 );