summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2020-03-26 15:52:16 +0100
committerantirez <antirez@gmail.com>2020-03-27 16:35:03 +0100
commit077f9654264d601a87b801f219e27b6097e9c861 (patch)
treebbafe70499e186a67dc031072860ccba8a510f27
parent8d11e0df7aeecd4f1bcdf1fbaa5ef19f44a4a18f (diff)
downloadredis-077f9654264d601a87b801f219e27b6097e9c861.tar.gz
Precise timeouts: fast exit for clientsHandleShortTimeout().
-rw-r--r--src/server.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/server.c b/src/server.c
index 25af4e161..7240794f1 100644
--- a/src/server.c
+++ b/src/server.c
@@ -1585,6 +1585,7 @@ void addClientToShortTimeoutTable(client *c) {
/* This function is called in beforeSleep() in order to unblock ASAP clients
* that are waiting in blocking operations with a short timeout set. */
void clientsHandleShortTimeout(void) {
+ if (raxSize(server.clients_timeout_table) == 0) return;
uint64_t now = mstime();
raxIterator ri;
raxStart(&ri,server.clients_timeout_table);