X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fnntp%2Fnntplistener.cpp;h=7f6e4693a099ffd8ada4821018990027fd9a77df;hb=b9c3763a932cebaa015a27fe111017f6f34dfbaa;hp=cfb72d710fec1c6fdbac8c30dadaf7d4bc21ac9f;hpb=d8ccfe2b3944adf07d35534459cdda19d15217c8;p=fms.git diff --git a/src/nntp/nntplistener.cpp b/src/nntp/nntplistener.cpp index cfb72d7..7f6e469 100644 --- a/src/nntp/nntplistener.cpp +++ b/src/nntp/nntplistener.cpp @@ -75,11 +75,12 @@ void NNTPListener::Run() newsock=accept((*listeni),(struct sockaddr *)&addr,&addrlen); LogFile::Instance()->WriteLog(LogFile::LOGLEVEL_INFO,"NNTPListener::run NNTP client connected"); //m_connections.execute(new NNTPConnection(newsock)); - m_connectionthreads.push_back(new PThread::Thread(new NNTPConnection(newsock))); + //m_connectionthreads.push_back(new PThread::Thread(new NNTPConnection(newsock))); + m_connections.Execute(new NNTPConnection(newsock)); } } } - +/* // check for any non-running connection threads that we can delete for(std::vector::iterator i=m_connectionthreads.begin(); i!=m_connectionthreads.end(); ) { @@ -93,6 +94,7 @@ void NNTPListener::Run() i++; } } +*/ //}while(!ZThread::Thread::interrupted() && m_listensockets.size()>0); }while(!IsCancelled() && m_listensockets.size()>0); @@ -116,6 +118,7 @@ void NNTPListener::Run() } } */ + /* for(std::vector::iterator i=m_connectionthreads.begin(); i!=m_connectionthreads.end(); i++) { if((*i)->IsRunning()) @@ -126,6 +129,9 @@ void NNTPListener::Run() } delete (*i); } + */ + m_connections.Cancel(); + m_connections.Join(); for(listeni=m_listensockets.begin(); listeni!=m_listensockets.end(); listeni++) {