Tidy earlier fix and apply another - both follow the principle of not removing the link from session to client DCB when dcb_close is called for client DCB. The close will not fully complete, but will be finalised when the session is freed. At this time, no DCBs will be referring to the session. These measures protect the dcb->data in the client DCB from being lost until the session is no longer needed.

This commit is contained in:
counterpoint
2016-02-24 15:34:02 +00:00
parent a61b70a810
commit c26b5a3dd0
2 changed files with 1 additions and 16 deletions

View File

@ -1166,9 +1166,7 @@ static int gw_backend_close(DCB *dcb)
spinlock_release(&session->ses_lock);
/** Close client DCB */
temp = session->client_dcb;
session->client_dcb = NULL;
dcb_close(temp);
dcb_close(session->client_dcb);
}
else
{