|
@@ -60,7 +60,7 @@ ChatServer::~ChatServer()
|
|
|
// nicht constant
|
|
|
void ChatServer::runn()
|
|
|
{
|
|
|
- while( !end )
|
|
|
+ while( !end && aServer->isConnected() )
|
|
|
{
|
|
|
SSLSKlient *klient;
|
|
|
klient = aServer->getKlient();
|
|
@@ -72,7 +72,7 @@ void ChatServer::runn()
|
|
|
return;
|
|
|
}
|
|
|
if( !klient )
|
|
|
- return;
|
|
|
+ continue;
|
|
|
CSAKlient *clHandle = new CSAKlient( klient, getThis() );
|
|
|
clHandle->start();
|
|
|
}
|
|
@@ -80,12 +80,12 @@ void ChatServer::runn()
|
|
|
|
|
|
void ChatServer::thread()
|
|
|
{
|
|
|
- while( 1 )
|
|
|
+ while( server->isConnected() )
|
|
|
{
|
|
|
SKlient *klient;
|
|
|
klient = server->getKlient();
|
|
|
if( !klient )
|
|
|
- break;
|
|
|
+ continue;
|
|
|
Framework::getThreadRegister()->cleanUpClosedThreads();
|
|
|
CSKlient *clHandle = new CSKlient( klient, getThis() );
|
|
|
cs.lock();
|