MXS-2068: Split reply_is_complete into two functions
By splitting the processing and state querying into two separate functions, the result can be inspected multiple times without triggering the result processing.
This commit is contained in:
@ -72,7 +72,9 @@ void CatSession::clientReply(GWBUF* pPacket, DCB* pDcb)
|
||||
mxb_assert(backend->dcb() == pDcb);
|
||||
bool send = false;
|
||||
|
||||
if (backend->reply_is_complete(pPacket))
|
||||
backend->process_reply(pPacket);
|
||||
|
||||
if (backend->reply_is_complete())
|
||||
{
|
||||
m_completed++;
|
||||
m_current++;
|
||||
|
@ -560,7 +560,9 @@ void RWSplitSession::clientReply(GWBUF* writebuf, DCB* backend_dcb)
|
||||
m_current_query.reset();
|
||||
}
|
||||
|
||||
if (backend->reply_is_complete(writebuf))
|
||||
backend->process_reply(writebuf);
|
||||
|
||||
if (backend->reply_is_complete())
|
||||
{
|
||||
/** Got a complete reply, decrement expected response count */
|
||||
m_expected_responses--;
|
||||
|
Reference in New Issue
Block a user