Unverified Commit f69fac76 authored by Kristján Valur Jónsson's avatar Kristján Valur Jónsson
Browse files

Drop `const` on redisAsyncContext in redisConnectCallback

Since the callback is now re-entrant, it can call apis such as redisAsyncDisconnect()
parent 005d7ede
......@@ -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 */
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment