1
0
mirror of https://github.com/golang/go synced 2024-11-17 01:04:50 -07:00

database/sql: save Close error into lasterr

This commit is contained in:
Jinzhu 2022-05-19 10:39:53 +08:00
parent 59a1fb6d18
commit 9f1f883c45

View File

@ -2987,10 +2987,7 @@ func (rs *Rows) Next() bool {
doClose, ok = rs.nextLocked()
})
if doClose {
err := rs.Close()
if err != nil {
rs.Close()
}
rs.Close()
}
return ok
}