MXS-2196: Always allocate a session
Whenever a client DCB is accepted, a session for it is allocated. This simplifies the handling of shared data between DCBs by allowing it to be placed inside the session object. Currently, the data is stashed away in the client DCB.
This commit is contained in:
@ -373,9 +373,7 @@ static int maxscaled_accept(DCB* client_dcb)
|
||||
pthread_mutex_init(&maxscaled_protocol->lock, NULL);
|
||||
client_dcb->protocol = (void*)maxscaled_protocol;
|
||||
|
||||
client_dcb->session = session_alloc(client_dcb->service, client_dcb);
|
||||
|
||||
if (NULL == client_dcb->session || poll_add_dcb(client_dcb))
|
||||
if (!session_start(client_dcb->session) || poll_add_dcb(client_dcb))
|
||||
{
|
||||
dcb_close(client_dcb);
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user