1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00

Set socket_keepalive to default to true

This commit is contained in:
Bryce Baril
2014-07-10 21:18:47 -07:00
parent 4e24f24e86
commit 8b5d55fecd
2 changed files with 2 additions and 2 deletions

View File

@@ -192,7 +192,7 @@ every command on a client.
* `socket_nodelay`: defaults to `true`. Whether to call setNoDelay() on the TCP stream, which disables the
Nagle algorithm on the underlying socket. Setting this option to `false` can result in additional throughput at the
cost of more latency. Most applications will want this set to `true`.
* `socket_keepalive` defaults to `false`. Whether the keep-alive functionality is enabled on the underlying socket.
* `socket_keepalive` defaults to `true`. Whether the keep-alive functionality is enabled on the underlying socket.
* `no_ready_check`: defaults to `false`. When a connection is established to the Redis server, the server might still
be loading the database from disk. While loading, the server not respond to any commands. To work around this,
`node_redis` has a "ready check" which sends the `INFO` command to the server. The response from the `INFO` command

View File

@@ -44,7 +44,7 @@ function RedisClient(stream, options) {
this.options.socket_nodelay = true;
}
if (this.options.socket_keepalive === undefined) {
this.options.socket_keepalive = false;
this.options.socket_keepalive = true;
}
this.should_buffer = false;
this.command_queue_high_water = this.options.command_queue_high_water || 1000;