Drop const
on redisAsyncContext in redisConnectCallback
Since the callback is now re-entrant, it can call apis such as redisAsyncDisconnect()
This commit is contained in:
parent
005d7edebe
commit
f69fac7690
2
async.h
2
async.h
@ -57,7 +57,7 @@ typedef struct redisCallbackList {
|
||||
|
||||
/* Connection callback prototypes */
|
||||
typedef void (redisDisconnectCallback)(const struct redisAsyncContext*, int status);
|
||||
typedef void (redisConnectCallback)(const struct redisAsyncContext*, int status);
|
||||
typedef void (redisConnectCallback)(struct redisAsyncContext*, int status);
|
||||
typedef void(redisTimerCallback)(void *timer, void *privdata);
|
||||
|
||||
/* Context for an async connection to Redis */
|
||||
|
2
test.c
2
test.c
@ -1946,7 +1946,7 @@ static void asCleanup(void* data)
|
||||
|
||||
static void commandCallback(struct redisAsyncContext *ac, void* _reply, void* _privdata);
|
||||
|
||||
static void connectCallback(const redisAsyncContext *c, int status) {
|
||||
static void connectCallback(redisAsyncContext *c, int status) {
|
||||
struct _astest *t = (struct _astest *)c->data;
|
||||
assert(t == &astest);
|
||||
assert(t->connects == 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user