predixy
predixy copied to clipboard
`EXEC without MULTI`
When supportTransaction() is false, WATCH and MULTI commands are forbidden.
EXEC should also be forbidden. Otherwise, MULTI command gets dropped (by predixy) but EXEC gets passed along, causing redis to return EXEC without MULTI
error.
just one line change
diff --git a/src/Handler.cpp b/src/Handler.cpp
index b29bdf4..a35c4b2 100644
--- a/src/Handler.cpp
+++ b/src/Handler.cpp
@@ -639,6 +639,7 @@ bool Handler::preHandleRequest(Request* req, const String& key)
return true;
case Command::Watch:
case Command::Multi:
+ case Command::Exec:
if (!mProxy->supportTransaction()) {
directResponse(req, Response::ForbidTransaction);
return true;
Thanks, Welcome Pull Reqeust