valkey-py
valkey-py copied to clipboard
AUTH errors on RESP 3 with health check interval > 0
Hi,
when using protocol=3 and a health_check_interval that is positive against a Valkey instance that has AUTH configured, any command raises an authentication error.
This is because the health check (PING and PONG) are sent before the actual command, even if it's the HELLO AUTH command: https://github.com/valkey-io/valkey-py/blob/main/valkey/connection.py#L381
Disabling the health checks or using protocol version 2 works as expected.