func sessionRelease(sess *xorm.Session) { if !sess.IsCommitedOrRollbacked { sess.Rollback() } sess.Close() }