Terminate connection when memory limit is exceeded.

This commit is contained in:
Bartosz Taudul 2024-05-05 21:04:26 +02:00
parent b64389ba15
commit 89f1fb4825
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -2763,7 +2763,7 @@ void Worker::Exec()
for(;;) for(;;)
{ {
if( m_shutdown.load( std::memory_order_relaxed ) ) if( m_shutdown.load( std::memory_order_relaxed ) || ( m_memoryLimit > 0 && memUsage.load( std::memory_order_relaxed ) > m_memoryLimit ) )
{ {
QueryTerminate(); QueryTerminate();
goto close; goto close;