Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit e47dccc

Browse files
committed
don't allow composite ops in Pipelines either
1 parent a7e96f0 commit e47dccc

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

src/ServiceStack.Redis/RedisClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ public IRedisTransaction CreateTransaction()
401401

402402
public void AssertNotInTransaction()
403403
{
404-
if (Transaction != null)
404+
if (Transaction != null || Pipeline != null)
405405
throw new NotSupportedException("Only atomic redis-server operations are supported in a transaction");
406406
}
407407

tests/ServiceStack.Redis.Tests/Issues/PipelineIssueTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ public void Can_Set_with_DateTime_in_Pipeline()
6161

6262
using (var pipeline = redis.CreatePipeline())
6363
{
64-
6564
pipeline.QueueCommand(r => r.Set(key, value), r => result = r);
6665
pipeline.QueueCommand(r => r.ExpireEntryAt(key, DateTime.Now.AddMinutes(1)));
6766

0 commit comments

Comments
 (0)