Commit dde9088b authored by Savorboard's avatar Savorboard

Fix the transaction commit bug caused by asynchrony. #62

parent ea0e152d
...@@ -123,7 +123,7 @@ namespace DotNetCore.CAP.Abstractions ...@@ -123,7 +123,7 @@ namespace DotNetCore.CAP.Abstractions
"If you are using the EntityFramework, you do not need to use this overloaded."); "If you are using the EntityFramework, you do not need to use this overloaded.");
} }
private Task PublishWithTransAsync(string name, string content) private async Task PublishWithTransAsync(string name, string content)
{ {
var message = new CapPublishedMessage var message = new CapPublishedMessage
{ {
...@@ -132,13 +132,11 @@ namespace DotNetCore.CAP.Abstractions ...@@ -132,13 +132,11 @@ namespace DotNetCore.CAP.Abstractions
StatusName = StatusName.Scheduled StatusName = StatusName.Scheduled
}; };
ExecuteAsync(DbConnection, DbTransaction, message); await ExecuteAsync(DbConnection, DbTransaction, message);
ClosedCap(); ClosedCap();
PublishQueuer.PulseEvent.Set(); PublishQueuer.PulseEvent.Set();
return Task.CompletedTask;
} }
private void PublishWithTrans(string name, string content) private void PublishWithTrans(string name, string content)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment