summaryrefslogtreecommitdiff
path: root/src/cluster.c
diff options
context:
space:
mode:
authorWuYunlong <xzsyeb@126.com>2022-06-23 23:41:32 +0800
committerGitHub <noreply@github.com>2022-06-23 18:41:32 +0300
commit64205345bcaf20d322b96a464a03912e33faff78 (patch)
tree1c8c63415d69481a3cc48f6cfb03358efd215054 /src/cluster.c
parent755b51a42c7b0dd570b80d9893ae26d94d71e39c (diff)
downloadredis-64205345bcaf20d322b96a464a03912e33faff78.tar.gz
migrateGetSocket() cleanup.. (#5546)
I think parameter c is only useful to get client reply. Besides, other commands' host and port parameters may not be the at index 1 and 2.
Diffstat (limited to 'src/cluster.c')
-rw-r--r--src/cluster.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cluster.c b/src/cluster.c
index a5d614815..e194ce27d 100644
--- a/src/cluster.c
+++ b/src/cluster.c
@@ -6097,7 +6097,7 @@ migrateCachedSocket* migrateGetSocket(client *c, robj *host, robj *port, long ti
/* Create the socket */
conn = server.tls_cluster ? connCreateTLS() : connCreateSocket();
- if (connBlockingConnect(conn, c->argv[1]->ptr, atoi(c->argv[2]->ptr), timeout)
+ if (connBlockingConnect(conn, host->ptr, atoi(port->ptr), timeout)
!= C_OK) {
addReplyError(c,"-IOERR error or timeout connecting to the client");
connClose(conn);