Skip to content

Commit 171777c

Browse files
author
zhengshuxin
committed
fixed one important bugs in redis pipeline mode.
1 parent b04c80e commit 171777c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib_acl_cpp/include/acl_cpp/redis/redis_client_pipeline.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,15 @@ class redis_pipeline_message {
9090
}
9191

9292
void set_request(size_t argc, const char** argv, size_t* lens) {
93+
// When running in coroutine of shared stack mode,
94+
// the variables on stack are volatile, so we should save
95+
// the request data in heap.
9396
#if 0
9497
argc_ = argc;
9598
argv_ = argv;
9699
lens_ = lens;
97100
#else
98-
if (argc_ > size_) {
101+
if (argc > size_) {
99102
delete [] argv_;
100103
delete [] lens_;
101104
size_ = argc;

0 commit comments

Comments
 (0)