Skip to content

Commit

Permalink
fix(MAGNETO-7807): Session init fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jordipuigbou committed Apr 5, 2022
1 parent 66a1d4a commit 94aa587
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions steps/rabbit/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ const contextKey ContextKey = "rabbitSession"
// InitializeContext adds the rabbit session to the context.
// The new context is returned because context is immutable.
func InitializeContext(ctx context.Context) context.Context {
var session Session
session.AMQPService = *NewAMQPService()
return context.WithValue(ctx, contextKey, session)
return context.WithValue(ctx, contextKey, &Session{AMQPService: *NewAMQPService()})
}

// GetSession returns the rabbit session stored in context.
Expand Down

0 comments on commit 94aa587

Please sign in to comment.