Update SessionExist to close the db connection

close the mysql connection
This commit is contained in:
Norman 2014-01-14 19:54:32 +08:00
parent 63f19974cd
commit dc767b65df
1 changed files with 1 additions and 0 deletions

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)