You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-09 00:22:08 +03:00
Stricten tests by always ending redis with .end(true) if possible
This commit is contained in:
@@ -246,7 +246,7 @@ something like this `Error: Ready check failed: ERR operation not permitted`.
|
||||
Forcibly close the connection to the Redis server. Note that this does not wait until all replies have been parsed.
|
||||
If you want to exit cleanly, call `client.quit()` to send the `QUIT` command after you have handled all replies.
|
||||
|
||||
If flush is set to true, all commands will be rejected instead of ignored after using `.end`.
|
||||
If flush is set to true, all still running commands will be rejected instead of ignored after using `.end`.
|
||||
|
||||
This example closes the connection to the Redis server before the replies have been read. You probably don't
|
||||
want to do this:
|
||||
@@ -263,8 +263,7 @@ client.get("foo_rand000000000000", function (err, reply) {
|
||||
});
|
||||
```
|
||||
|
||||
`client.end()` is useful for timeout cases where something is stuck or taking too long and you want
|
||||
to start over.
|
||||
`client.end()` without the flush parameter should not be used in production!
|
||||
|
||||
## client.unref()
|
||||
|
||||
|
Reference in New Issue
Block a user