Browse Source

Fehler bei unverschlüsselten Clients behoben

Kolja Strohm 6 years ago
parent
commit
09f9a173b7
1 changed files with 4 additions and 4 deletions
  1. 4 4
      NewsServer/NewsServer.cpp

+ 4 - 4
NewsServer/NewsServer.cpp

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