Skip to content

Commit

Permalink
fix: auth command should be not allowed in auto pipeline. (#1242)
Browse files Browse the repository at this point in the history
The auth command should be sent before other commands.
So it should be exclude from auto pipeline command list as well.
  • Loading branch information
sj82516 authored Dec 13, 2020
1 parent cd336bf commit bafdd4b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/autoPipelining.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -17,7 +18,11 @@ export const notAllowedAutoPipelineCommands = [
"unpsubscribe",
];

function findAutoPipeline(client, _commandName, ...args: Array<string>): string {
function findAutoPipeline(
client,
_commandName,
...args: Array<string>
): string {
if (!client.isCluster) {
return "main";
}
Expand Down

0 comments on commit bafdd4b

Please sign in to comment.