Clear residual buffered data when reconnecting to the master in all cases
This commit is contained in:
@ -104,6 +104,15 @@ GWBUF *buf;
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
router->master_state = BLRM_CONNECTING;
|
router->master_state = BLRM_CONNECTING;
|
||||||
|
|
||||||
|
/* Discard the queued residual data */
|
||||||
|
buf = router->residual;
|
||||||
|
while (buf)
|
||||||
|
{
|
||||||
|
buf = gwbuf_consume(buf, GWBUF_LENGTH(buf));
|
||||||
|
}
|
||||||
|
router->residual = NULL;
|
||||||
|
|
||||||
spinlock_release(&router->lock);
|
spinlock_release(&router->lock);
|
||||||
if ((client = dcb_alloc(DCB_ROLE_INTERNAL)) == NULL)
|
if ((client = dcb_alloc(DCB_ROLE_INTERNAL)) == NULL)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user