Copy error to redisAsyncContext on timeout

This commit is contained in:
shiyuge 2020-09-23 15:46:20 +08:00 committed by GitHub
parent 2a5a57b90a
commit 773d6ea8a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -703,6 +703,7 @@ void redisAsyncHandleTimeout(redisAsyncContext *ac) {
if (!c->err) { if (!c->err) {
__redisSetError(c, REDIS_ERR_TIMEOUT, "Timeout"); __redisSetError(c, REDIS_ERR_TIMEOUT, "Timeout");
__redisAsyncCopyError(ac);
} }
if (!(c->flags & REDIS_CONNECTED) && ac->onConnect) { if (!(c->flags & REDIS_CONNECTED) && ac->onConnect) {