Commit e993f4be authored by Savorboard's avatar Savorboard

Fix flush unclaer data bugs.

parent eb15dedb
...@@ -24,12 +24,14 @@ namespace DotNetCore.CAP ...@@ -24,12 +24,14 @@ namespace DotNetCore.CAP
_bufferList.Add(msg); _bufferList.Add(msg);
} }
protected void Flush() protected virtual void Flush()
{ {
foreach (var message in _bufferList) foreach (var message in _bufferList)
{ {
_dispatcher.EnqueueToPublish(message); _dispatcher.EnqueueToPublish(message);
} }
_bufferList.Clear();
} }
public abstract void Commit(); public abstract void Commit();
......
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