cpp-redis / cpp_redis

C++11 Lightweight Redis client: async, thread-safe, no dependency, pipelining, multi-platform
MIT License
713 stars 198 forks source link

Wrong return value after disconnect while using AUTH #82

Open shooshx opened 3 years ago

shooshx commented 3 years ago

Describe the bug The return value of the first command that happens after a reconnect to a server that uses AUTH is just the string "OK" instead of the expected reply.

To Reproduce Steps to reproduce the behavior:

  1. start a local service with authentication enabled (requirepass foobared in redis.conf)
  2. open a connection with the client, send the "AUTH foobared" command
  3. use the client to send the command "SET somekey 1"
  4. restart the service, the client reconnects
  5. use the client to send the command "INCR somekey"
  6. the command returns "OK"

Expected behavior the last command should return 2

Desktop (please complete the following information):