Added DCB state check to backend error evend handler. If state isn't DCB_STATE_POLLING anymore, socket is closed with purpose or error occurred but it has already been handled.
Client doesn't hang anymore at least with the documented method.
This commit is contained in:
VilhoRaatikka 2014-07-04 14:26:55 +03:00
parent b40a1a9ed8
commit 5357f6e2f2

View File

@ -778,8 +778,16 @@ static int gw_error_backend_event(DCB *dcb)
LOGFILE_ERROR,
"Backend error event handling.")));
#endif
/**
* Avoid running redundant error handling procedure.
* dcb_close is already called for the DCB. Thus, either connection is
* closed by router and COM_QUIT sent or there was an error which
* have already been handled.
*/
if (dcb->session != DCB_STATE_POLLING)
{
return 1;
}
errbuf = mysql_create_custom_error(
1,
0,