Skip to content

Commit

Permalink
fix(eventstore/mongodb): pass context with transaction to inTx handler
Browse files Browse the repository at this point in the history
  • Loading branch information
klowdo authored Mar 11, 2022
1 parent d9133a0 commit 441b029
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eventstore/mongodb_v2/eventstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ func (s *EventStore) Save(ctx context.Context, events []eh.Event, originalVersio

if s.eventHandlerInTX != nil {
for _, e := range events {
if err := s.eventHandlerInTX.HandleEvent(ctx, e); err != nil {
if err := s.eventHandlerInTX.HandleEvent(txCtx, e); err != nil {
return nil, fmt.Errorf("could not handle event in transaction: %w", err)
}
}
Expand Down

0 comments on commit 441b029

Please sign in to comment.