From 72749916140e8a0480efdea60c457f502885e6c0 Mon Sep 17 00:00:00 2001 From: Pavlo Yatsukhnenko Date: Thu, 22 Nov 2018 22:52:39 +0200 Subject: Issue #1464 --- cluster_library.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cluster_library.c') 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 -- cgit v1.2.3