From b9e9575b9bbed5f0c1df3748567711de666d8e95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Schw=C3=B6rer?= Date: Tue, 16 Jan 2024 15:04:10 +0100 Subject: [PATCH] v0.0.378 --- ginext/preContext.go | 8 ++++---- ginext/session.go | 2 +- goextVersion.go | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ginext/preContext.go b/ginext/preContext.go index a02da80..5957bde 100644 --- a/ginext/preContext.go +++ b/ginext/preContext.go @@ -163,16 +163,16 @@ func (pctx PreContext) Start() (*AppContext, *gin.Context, *HTTPResponse) { ictx, cancel := context.WithTimeout(context.Background(), langext.Coalesce(pctx.timeout, pctx.wrapper.requestTimeout)) + actx := CreateAppContext(pctx.ginCtx, ictx, cancel) + if pctx.persistantData.sessionObj != nil { - err := pctx.persistantData.sessionObj.Init(pctx.ginCtx, ictx) + err := pctx.persistantData.sessionObj.Init(pctx.ginCtx, actx) if err != nil { - cancel() + actx.Cancel() return nil, nil, langext.Ptr(Error(exerr.Wrap(err, "Failed to init session").Build())) } } - actx := CreateAppContext(pctx.ginCtx, ictx, cancel) - return actx, pctx.ginCtx, nil } diff --git a/ginext/session.go b/ginext/session.go index ee1ce5f..0d6283c 100644 --- a/ginext/session.go +++ b/ginext/session.go @@ -6,6 +6,6 @@ import ( ) type SessionObject interface { - Init(g *gin.Context, ctx context.Context) error + Init(g *gin.Context, ctx *AppContext) error Finish(ctx context.Context, resp HTTPResponse) error } diff --git a/goextVersion.go b/goextVersion.go index b636733..b700a35 100644 --- a/goextVersion.go +++ b/goextVersion.go @@ -1,5 +1,5 @@ package goext -const GoextVersion = "0.0.377" +const GoextVersion = "0.0.378" -const GoextVersionTimestamp = "2024-01-14T17:06:42+0100" +const GoextVersionTimestamp = "2024-01-16T15:04:10+0100"