mirror of
https://github.com/pocoproject/poco.git
synced 2026-01-02 10:43:22 +01:00
* fix(TCPServer): continues to accept connections after stop() #4892 * fix(TCPServer): first attempt to silence TSAN #4892 * fix(TCPServer): check stopped status after poll; add TCPServerFactory::stop() and allow factory to return nullptr on connection creation request #4892 * fix(TCPServer): initialize factory stopped flag #4892 * revert(SocketImpl): atomic sock fd
This commit is contained in:
committed by
GitHub
parent
91244ac9d9
commit
eb94de03a6
@@ -112,10 +112,12 @@ void TCPServerDispatcher::run()
|
||||
if (pCNf)
|
||||
{
|
||||
std::unique_ptr<TCPServerConnection> pConnection(_pConnectionFactory->createConnection(pCNf->socket()));
|
||||
poco_check_ptr(pConnection.get());
|
||||
beginConnection();
|
||||
pConnection->start();
|
||||
endConnection();
|
||||
if (pConnection)
|
||||
{
|
||||
beginConnection();
|
||||
pConnection->start();
|
||||
endConnection();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -173,6 +175,7 @@ void TCPServerDispatcher::enqueue(const StreamSocket& socket)
|
||||
void TCPServerDispatcher::stop()
|
||||
{
|
||||
FastMutex::ScopedLock lock(_mutex);
|
||||
_pConnectionFactory->stop();
|
||||
_stopped = true;
|
||||
_queue.clear();
|
||||
for (int i = 0; i < _threadPool.allocated(); i++)
|
||||
|
||||
Reference in New Issue
Block a user