race in connection state when setting a handler on a different thread
Former-commit-id: 42c7677690c434168135992429f7521239475ef8
This commit is contained in:
parent
d3bd1ab56b
commit
0dd0ea7eda
@ -31,6 +31,8 @@
|
||||
#ifndef __REDIS_CONNECTION_H
|
||||
#define __REDIS_CONNECTION_H
|
||||
|
||||
#include <atomic>
|
||||
|
||||
#define CONN_INFO_LEN 32
|
||||
|
||||
struct aeEventLoop;
|
||||
@ -70,7 +72,7 @@ typedef struct ConnectionType {
|
||||
|
||||
struct connection {
|
||||
ConnectionType *type;
|
||||
ConnectionState state;
|
||||
std::atomic<ConnectionState> state;
|
||||
short int flags;
|
||||
short int refs;
|
||||
int last_errno;
|
||||
|
Loading…
x
Reference in New Issue
Block a user