Deliver hangups only to valid DCBs

If a DCB was closed and a hangup event was sent to it via
dcb_hangup_foreach shortly after it was closed, the DCB would still
receive it even if it was closed. To prevent this, events must only be
delivered to DCBs if they haven't been closed.
This commit is contained in:
Markus Mäkelä
2019-03-08 07:45:59 +02:00
parent 71a3cde441
commit 7db87784ac
3 changed files with 4 additions and 4 deletions

View File

@ -1354,6 +1354,7 @@ static int gw_error_backend_event(DCB* dcb)
*/
static int gw_backend_hangup(DCB* dcb)
{
mxb_assert(dcb->n_close == 0);
MXS_SESSION* session = dcb->session;
if (dcb->persistentstart)