Attempt solution to crash caused by leaving link to backend DCB in router session.
This commit is contained in:
@ -1145,7 +1145,6 @@ gw_backend_hangup(DCB *dcb)
|
||||
spinlock_release(&session->ses_lock);
|
||||
}
|
||||
ss_dassert(dcb->dcb_errhandle_called);
|
||||
dcb_close(dcb);
|
||||
|
||||
retblock:
|
||||
return 1;
|
||||
|
@ -74,6 +74,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <service.h>
|
||||
#include <server.h>
|
||||
#include <router.h>
|
||||
@ -855,6 +856,7 @@ static void handleError(
|
||||
DCB *client_dcb;
|
||||
SESSION *session = backend_dcb->session;
|
||||
session_state_t sesstate;
|
||||
ROUTER_CLIENT_SES *router_cli_ses = (ROUTER_CLIENT_SES *)router_session;
|
||||
|
||||
/** Reset error handle flag from a given DCB */
|
||||
if (action == ERRACT_RESET)
|
||||
@ -889,6 +891,14 @@ static void handleError(
|
||||
spinlock_release(&session->ses_lock);
|
||||
}
|
||||
|
||||
if (backend_dcb != router_cli_ses->backend_dcb)
|
||||
{
|
||||
/* Linkages have gone badly wrong - this may not be best solution */
|
||||
raise(SIGABRT);
|
||||
}
|
||||
router_cli_ses->backend_dcb = NULL;
|
||||
dcb_close(backend_dcb);
|
||||
|
||||
/** false because connection is not available anymore */
|
||||
*succp = false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user