c20e1ab1 by astaxie

Merge pull request #463 from NormanZhang/develop

Update SessionExist to close the db connection
2 parents 63f19974 dc767b65
...@@ -115,6 +115,7 @@ func (mp *MysqlProvider) SessionRead(sid string) (SessionStore, error) { ...@@ -115,6 +115,7 @@ func (mp *MysqlProvider) SessionRead(sid string) (SessionStore, error) {
115 115
116 func (mp *MysqlProvider) SessionExist(sid string) bool { 116 func (mp *MysqlProvider) SessionExist(sid string) bool {
117 c := mp.connectInit() 117 c := mp.connectInit()
118 defer c.Close()
118 row := c.QueryRow("select session_data from session where session_key=?", sid) 119 row := c.QueryRow("select session_data from session where session_key=?", sid)
119 var sessiondata []byte 120 var sessiondata []byte
120 err := row.Scan(&sessiondata) 121 err := row.Scan(&sessiondata)
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!