MXS-1392 Manage DCB lifetime using refcounts
Now it is also possible to ensure that a DCB stays alive while a task referring to it is posted from one worker to another. That will be implemented in a subsequent commit.
This commit is contained in:
@ -37,6 +37,7 @@
|
||||
#include <maxscale/utils.h>
|
||||
#include <maxscale/json_api.h>
|
||||
|
||||
#include "maxscale/dcb.h"
|
||||
#include "maxscale/session.h"
|
||||
#include "maxscale/filter.h"
|
||||
#include "maxscale/worker.hh"
|
||||
@ -392,7 +393,8 @@ static void session_free(MXS_SESSION *session)
|
||||
|
||||
if (session->client_dcb)
|
||||
{
|
||||
dcb_free_all_memory(session->client_dcb);
|
||||
dcb_dec_ref(session->client_dcb);
|
||||
session->client_dcb = NULL;
|
||||
}
|
||||
/**
|
||||
* If session is not child of some other session, free router_session.
|
||||
|
||||
Reference in New Issue
Block a user