After You run Redis auth command, whatever command executed next would always return a string "OK".
It seems that the result of the auth command remains in the buffer and will be fetched by your next command execution.
Client client("host:port");
Array array;
array << "auth" << "passwd";
client.execute<void>(array);
array.clear();
array << "GET" << "key";
client.execute<string>(array); <----- always get "OK", instead of value of _key_
array.clear();
array << "GET" << "key";
client.execute<BulkString>(array); <----- now you can get correct value of _key_
Expected behavior
return the result of your execution
Actual behavior
always return "OK"
Steps to reproduce the problem
run auth command first, then run GET command you will always get the result "OK".
POCO version
1.9.0
Compiler and version
gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)
Operating system and version
Ubuntu 18.04 LTS
Other relevant information
none
After You run Redis auth command, whatever command executed next would always return a string "OK".
It seems that the result of the auth command remains in the buffer and will be fetched by your next command execution.
Expected behavior
return the result of your execution
Actual behavior
always return "OK"
Steps to reproduce the problem
run auth command first, then run GET command you will always get the result "OK".
POCO version
1.9.0
Compiler and version
gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)
Operating system and version
Ubuntu 18.04 LTS
Other relevant information
none