Browse Source

Fehler bei unverschlüsselten Clients behoben

Kolja Strohm 6 năm trước cách đây
mục cha
commit
45e12470c7
1 tập tin đã thay đổi với 4 bổ sung4 xóa
  1. 4 4
      LoginServer/LoginServer.cpp

+ 4 - 4
LoginServer/LoginServer.cpp

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