You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-10 11:43:01 +03:00
readme: how to correctly auth to server, what error looks like if done wrong
This commit is contained in:
@@ -213,6 +213,9 @@ first command after connecting. This can be tricky to coordinate with reconnect
|
|||||||
etc. To make this easier, `client.auth()` stashes `password` and will send it after each connection,
|
etc. To make this easier, `client.auth()` stashes `password` and will send it after each connection,
|
||||||
including reconnections. `callback` is invoked only once, after the response to the very first
|
including reconnections. `callback` is invoked only once, after the response to the very first
|
||||||
`AUTH` command sent.
|
`AUTH` command sent.
|
||||||
|
NOTE: Your call to `client.auth()` should not be inside the ready handler. If
|
||||||
|
you are doing this wrong, `client` will emit an error that looks
|
||||||
|
something like this `Error: Ready check failed: ERR operation not permitted`.
|
||||||
|
|
||||||
## client.end()
|
## client.end()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user