From bafdd4b928f40d8ede5d890b3f7fab0b7139f50b Mon Sep 17 00:00:00 2001 From: "YuanChieh,Cheng" Date: Sun, 13 Dec 2020 18:24:15 +0800 Subject: [PATCH] fix: auth command should be not allowed in auto pipeline. (#1242) The auth command should be sent before other commands. So it should be exclude from auto pipeline command list as well. --- lib/autoPipelining.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/autoPipelining.ts b/lib/autoPipelining.ts index 7855de7c..d75282b1 100644 --- a/lib/autoPipelining.ts +++ b/lib/autoPipelining.ts @@ -5,6 +5,7 @@ import asCallback from "standard-as-callback"; export const kExec = Symbol("exec"); export const kCallbacks = Symbol("callbacks"); export const notAllowedAutoPipelineCommands = [ + "auth", "info", "script", "quit", @@ -17,7 +18,11 @@ export const notAllowedAutoPipelineCommands = [ "unpsubscribe", ]; -function findAutoPipeline(client, _commandName, ...args: Array): string { +function findAutoPipeline( + client, + _commandName, + ...args: Array +): string { if (!client.isCluster) { return "main"; }