1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-21 21:50:55 +00:00

Merge pull request #463 from NormanZhang/develop

Update SessionExist to close the db connection
This commit is contained in:
astaxie 2014-01-14 06:13:34 -08:00
commit c20e1ab1e2

View File

@ -115,6 +115,7 @@ func (mp *MysqlProvider) SessionRead(sid string) (SessionStore, error) {
func (mp *MysqlProvider) SessionExist(sid string) bool {
c := mp.connectInit()
defer c.Close()
row := c.QueryRow("select session_data from session where session_key=?", sid)
var sessiondata []byte
err := row.Scan(&sessiondata)