Close sessions in MaxScale core
The core now provides a simple function to close a session. This removes the need for the modules to directly call the API entry points when the session should be closed. It is also in line with the style that other objects, namely the DCBs, use. This makes the new session_close very similar to dcb_close.
This commit is contained in:
@ -324,6 +324,17 @@ static inline bool session_set_autocommit(MXS_SESSION* ses, bool autocommit)
|
||||
*/
|
||||
MXS_SESSION* session_get_by_id(int id);
|
||||
|
||||
/**
|
||||
* @brief Close a session
|
||||
*
|
||||
* Calling this function will start the session shutdown process. The shutdown
|
||||
* closes all related backend DCBs by calling the closeSession entry point
|
||||
* of the router session.
|
||||
*
|
||||
* @param session The session to close
|
||||
*/
|
||||
void session_close(MXS_SESSION *session);
|
||||
|
||||
/**
|
||||
* @brief Release a session reference
|
||||
*
|
||||
|
Reference in New Issue
Block a user