Hello,
this is more a golang-question I think.
You clone the dbsession, defer the dbsession and put it into the env. (
|
session := application.DBSession.Clone() |
|
defer session.Close() |
|
c.Env["DBSession"] = session |
)
As I understand defer, it will close the dbsession, when the method "ApplyDatabase" ends. So, when you fetch the dbsession from env it should be closed.
So, where is my fault?
thanks
Hello,
this is more a golang-question I think.
You clone the dbsession, defer the dbsession and put it into the env. (
defaultproject/system/middleware.go
Lines 37 to 39 in a932866
As I understand defer, it will close the dbsession, when the method "ApplyDatabase" ends. So, when you fetch the dbsession from env it should be closed.
So, where is my fault?
thanks