Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cluster_library.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cluster_library.c b/cluster_library.c
index 780c3615..3dfcbc9d 100644
--- a/cluster_library.c
+++ b/cluster_library.c
@@ -1384,6 +1384,11 @@ PHP_REDIS_API short cluster_send_command(redisCluster *c, short slot, const char
int resp, timedout = 0;
long msstart;
+ if (!SLOT(c, slot)) {
+ zend_throw_exception_ex(redis_cluster_exception_ce, 0,
+ "The slot %d is not covered by any node in this cluster", slot);
+ return -1;
+ }
/* Set the slot we're operating against as well as it's socket. These can
* change during our request loop if we have a master failure and are
* configured to fall back to slave nodes, or if we have to fall back to