Detected closed socket in mysql_client.c:gw_read_client_event now calls the closeSession.
This will fix left opened backend connections if the client connection aborts
This commit is contained in:
parent
c55ca0aaee
commit
37bd63b33b
@ -539,7 +539,7 @@ int gw_read_client_event(DCB* dcb) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Socket was closed.
|
||||
* The client socket was closed.
|
||||
*/
|
||||
if (b == 0) {
|
||||
skygw_log_write(
|
||||
@ -554,6 +554,17 @@ int gw_read_client_event(DCB* dcb) {
|
||||
dcb->func.close(dcb);
|
||||
}
|
||||
rc = 0;
|
||||
|
||||
// get the backend session, if available, and close the session
|
||||
if (session != NULL) {
|
||||
CHK_SESSION(session);
|
||||
router = session->service->router;
|
||||
router_instance = session->service->router_instance;
|
||||
rsession = session->router_session;
|
||||
if (rsession)
|
||||
router->closeSession(router_instance, rsession);
|
||||
}
|
||||
|
||||
goto return_rc;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user