Added spinlock ses_lock to struct SESSION to ensure that for each session closeSession is called only once.
closeSession is called from mysql_backend.c:gw_read_backend_event, and from dcb.c:dcb_close. This is part of Bug #163.
This commit is contained in:
@ -33,6 +33,8 @@
|
||||
* @endverbatim
|
||||
*/
|
||||
#include <time.h>
|
||||
#include <atomic.h>
|
||||
#include <spinlock.h>
|
||||
|
||||
struct dcb;
|
||||
struct service;
|
||||
@ -52,6 +54,7 @@ typedef struct {
|
||||
* and originating service together for the client session.
|
||||
*/
|
||||
typedef struct session {
|
||||
SPINLOCK ses_lock;
|
||||
int state; /**< Current descriptor state */
|
||||
struct dcb *client; /**< The client connection */
|
||||
struct dcb *backends; /**< The set of backend servers */
|
||||
|
||||
Reference in New Issue
Block a user