Fixed data races

This commit is contained in:
2019-06-02 00:28:22 +09:00
parent 28db818c37
commit 4d919ef752
6 changed files with 46 additions and 41 deletions

View File

@ -14,11 +14,11 @@ type OpenGraphContext struct {
// OpenGraph middleware modifies the context to be an OpenGraphContext.
func OpenGraph(next aero.Handler) aero.Handler {
return func(ctx aero.Context) error {
ctx = &OpenGraphContext{
openGraphCtx := &OpenGraphContext{
Context: ctx,
OpenGraph: nil,
}
return next(ctx)
return next(openGraphCtx)
}
}