Skip to content

Commit

Permalink
Merge pull request #386 from klowdo/main
Browse files Browse the repository at this point in the history
fix(eventstore/mongodb): pass context with transaction to inTx handler
  • Loading branch information
maxekman authored May 7, 2022
2 parents db3d139 + 441b029 commit 9da9436
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 9da9436

Please sign in to comment.