1
0
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:
Ruben Bridgewater
2015-11-22 16:56:54 +01:00
parent 0913a4d521
commit 8bf794fb36
57 changed files with 83 additions and 77 deletions

View File

@@ -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()