EulerianTechnologies / eredis

Fast and light Redis C client library built over Hiredis, thread-safe, write replication, auto-reconnect, sync pool, async libev.
BSD 3-Clause "New" or "Revised" License
81 stars 38 forks source link

NOAUTH Authentication required even after executing auth command #9

Closed cogmeta closed 6 years ago

cogmeta commented 7 years ago

eredis client is sometimes returning "NOAUTH Authentication required" error even after setting auth via AUTH command. To be clear, some commands appear to succeed before the error returns. Anyone has any explanation?

guillaumef commented 7 years ago

I think you reached the timeout of your redis connection (server side) and the reconnect (which is seamless) is not reapplying the AUTH command. I will test it and let you known. Thanks (sorry for the delay).

guillaumef commented 7 years ago

Patched here: https://github.com/EulerianTechnologies/eredis/commit/b25cc1b9c4191df9b540efbbb8ed955965af15ef

Take a look at 'eredis_pc_cmd' here: https://github.com/EulerianTechnologies/eredis#add-post-connection-requests-beta

Please let me know if it's ok for you.

cogmeta commented 7 years ago

Thank, @guillaumef. I will test eredis_pc_cmd and report back.