Do client callback on owning worker

The callback should've been done on the worker that owns the DCB instead
of the main worker.
This commit is contained in:
Markus Mäkelä
2019-05-09 10:05:40 +03:00
parent b313c6d0e7
commit 788dc429f8

View File

@ -244,7 +244,7 @@ bool file_in_dir(const char* dir, const char* file)
*/
void AvroSession::queue_client_callback()
{
auto worker = mxs::RoutingWorker::get(mxs::RoutingWorker::MAIN);
auto worker = static_cast<mxs::RoutingWorker*>(dcb->poll.owner);
worker->execute([this]() {
client_callback();
}, mxs::RoutingWorker::EXECUTE_QUEUED);