MXS-2196: Fix dcb error flag assignment
The error flag was set before the function was called which caused the function to never be used. As the core should handle the filtering of multiple errors on the same DCB, the protocol modules should not check it.
This commit is contained in:
@ -1927,8 +1927,11 @@ static void dcb_hangup_foreach_worker(MXB_WORKER* worker, struct SERVER* server)
|
||||
{
|
||||
if (dcb->state == DCB_STATE_POLLING && dcb->server && dcb->server == server)
|
||||
{
|
||||
dcb->dcb_errhandle_called = true;
|
||||
dcb->func.hangup(dcb);
|
||||
if (!dcb->dcb_errhandle_called)
|
||||
{
|
||||
dcb->func.hangup(dcb);
|
||||
dcb->dcb_errhandle_called = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2673,13 +2676,13 @@ static uint32_t dcb_process_poll_events(DCB* dcb, uint32_t events)
|
||||
|
||||
if (!dcb->dcb_errhandle_called)
|
||||
{
|
||||
dcb->dcb_errhandle_called = true;
|
||||
|
||||
if (dcb_session_check(dcb, "hangup EPOLLHUP"))
|
||||
{
|
||||
DCB_EH_NOTICE("Calling dcb->func.hangup(%p)", dcb);
|
||||
dcb->func.hangup(dcb);
|
||||
}
|
||||
|
||||
dcb->dcb_errhandle_called = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2700,13 +2703,13 @@ static uint32_t dcb_process_poll_events(DCB* dcb, uint32_t events)
|
||||
|
||||
if (!dcb->dcb_errhandle_called)
|
||||
{
|
||||
dcb->dcb_errhandle_called = true;
|
||||
|
||||
if (dcb_session_check(dcb, "hangup EPOLLRDHUP"))
|
||||
{
|
||||
DCB_EH_NOTICE("Calling dcb->func.hangup(%p)", dcb);
|
||||
dcb->func.hangup(dcb);
|
||||
}
|
||||
|
||||
dcb->dcb_errhandle_called = true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user