Don't capture this in callback

This commit is contained in:
Antonio Andelic 2023-09-20 13:32:01 +00:00
parent 0bc41bab74
commit 1a94675350
2 changed files with 2 additions and 2 deletions

View File

@ -382,7 +382,7 @@ void KeeperTCPHandler::runImpl()
}
auto response_fd = poll_wrapper->getResponseFD();
auto response_callback = [this, response_fd] (const Coordination::ZooKeeperResponsePtr & response)
auto response_callback = [responses = this->responses, response_fd](const Coordination::ZooKeeperResponsePtr & response)
{
if (!responses->push(response))
throw Exception(ErrorCodes::SYSTEM_ERROR,

View File

@ -25,7 +25,7 @@ struct SocketInterruptablePollWrapper;
using SocketInterruptablePollWrapperPtr = std::unique_ptr<SocketInterruptablePollWrapper>;
using ThreadSafeResponseQueue = ConcurrentBoundedQueue<Coordination::ZooKeeperResponsePtr>;
using ThreadSafeResponseQueuePtr = std::unique_ptr<ThreadSafeResponseQueue>;
using ThreadSafeResponseQueuePtr = std::shared_ptr<ThreadSafeResponseQueue>;
struct LastOp;
using LastOpMultiVersion = MultiVersion<LastOp>;