Skip to content

Commit c11f35b

Browse files
authored
Merge pull request #88749 from Ausxor/patch-5
Correcting invalid CompleteAsync() on TransactionScope
2 parents bcf4750 + 39edeba commit c11f35b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

articles/service-bus-messaging/service-bus-partitioning.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ using (TransactionScope ts = new TransactionScope(committableTransaction))
6868
ServiceBusMessage msg = new ServiceBusMessage("This is a message");
6969
msg.PartitionKey = "myPartitionKey";
7070
await sender.SendMessageAsync(msg);
71-
await ts.CompleteAsync();
71+
ts.Complete();
7272
}
7373
committableTransaction.Commit();
7474
```
@@ -88,7 +88,7 @@ using (TransactionScope ts = new TransactionScope(committableTransaction))
8888
ServiceBusMessage msg = new ServiceBusMessage("This is a message");
8989
msg.SessionId = "mySession";
9090
await sender.SendMessageAsync(msg);
91-
await ts.CompleteAsync();
91+
ts.Complete();
9292
}
9393
committableTransaction.Commit();
9494
```

0 commit comments

Comments
 (0)