Ver Fonte

Fehler bei unverschlüsselten Clients behoben

Kolja Strohm há 6 anos atrás
pai
commit
09f9a173b7
1 ficheiros alterados com 4 adições e 4 exclusões
  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 );