3
0
mirror of https://github.com/ergochat/ergo.git synced 2026-01-02 08:17:57 +01:00

propagate mysql close error

This commit is contained in:
Shivaram Lingamneni 2025-12-30 23:13:55 -05:00
parent 9f54ea07b7
commit 0b7be24f80

View File

@ -1049,13 +1049,13 @@ func (mysql *MySQL) ListChannels(cfchannels []string) (results []history.TargetL
return
}
func (mysql *MySQL) Close() error {
func (mysql *MySQL) Close() (err error) {
// closing the database will close our prepared statements as well
if mysql.db != nil {
mysql.db.Close()
err = mysql.db.Close()
}
mysql.db = nil
return nil
return
}
// implements history.Sequence, emulating a single history buffer (for a channel,