summaryrefslogtreecommitdiff
path: root/test.c
diff options
context:
space:
mode:
authorMichael Grunder <michael.grunder@gmail.com>2022-08-26 10:35:38 -0700
committerGitHub <noreply@github.com>2022-08-26 10:35:38 -0700
commite0200b797bb9ea1cdb744f371c3de09f72558343 (patch)
tree04fd2496251b711109b73046270f1231a61eb662 /test.c
parente7afd998f9ce3e6dfaa5e6534f779cab6a1c5a7b (diff)
parent6a3e96ad2149584e441b0e8a5827dc6c2624035b (diff)
Merge pull request #1087 from redis/const-and-non-const-callback
Maintain backward compatibiliy withour onConnect callback.
Diffstat (limited to 'test.c')
-rw-r--r--test.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/test.c b/test.c
index fccaca4..b901752 100644
--- a/test.c
+++ b/test.c
@@ -2008,7 +2008,7 @@ static redisAsyncContext *do_aconnect(struct config config, astest_no testno)
{
redisOptions options = {0};
memset(&astest, 0, sizeof(astest));
-
+
astest.testno = testno;
astest.connect_status = astest.disconnect_status = -2;
@@ -2039,7 +2039,7 @@ static redisAsyncContext *do_aconnect(struct config config, astest_no testno)
c->data = &astest;
c->dataCleanup = asCleanup;
redisPollAttach(c);
- redisAsyncSetConnectCallback(c, connectCallback);
+ redisAsyncSetConnectCallbackNC(c, connectCallback);
redisAsyncSetDisconnectCallback(c, disconnectCallback);
return c;
}
@@ -2058,7 +2058,7 @@ static void test_async_polling(struct config config) {
int status;
redisAsyncContext *c;
struct config defaultconfig = config;
-
+
test("Async connect: ");
c = do_aconnect(config, ASTEST_CONNECT);
assert(c);
@@ -2095,7 +2095,7 @@ static void test_async_polling(struct config config) {
test_cond(astest.connect_status == REDIS_ERR);
config = defaultconfig;
}
-
+
/* Test a ping/pong after connection */
test("Async PING/PONG: ");
c = do_aconnect(config, ASTEST_PINGPONG);