Skip to content

Commit c8e05b2

Browse files
committed
synchronized callback after event is removed from the store
1 parent 8a9b9c3 commit c8e05b2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/event-processor/src/pendingEventsDispatcher.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ export class PendingEventsDispatcher implements EventDispatcher {
6666
protected send(entry: DispatcherEntry, callback: EventDispatcherCallback): void {
6767
this.store.set(entry.uuid, entry).then(() => {
6868
this.dispatcher.dispatchEvent(entry.request, response => {
69-
this.store.remove(entry.uuid)
70-
callback(response)
69+
this.store.remove(entry.uuid).then(() => callback(response))
7170
})
7271
})
7372
}

0 commit comments

Comments
 (0)