mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Fix issue where engine would panic when attempting to export through a closed connection
This commit is contained in:
committed by
Dan Christian Bogos
parent
d8661feed9
commit
006b184a33
@@ -146,7 +146,9 @@ func (sqlEe *SQLEe) ExportEvent(req interface{}, _ string) error {
|
||||
|
||||
func (sqlEe *SQLEe) Close() (err error) {
|
||||
sqlEe.Lock()
|
||||
err = sqlEe.sqldb.Close()
|
||||
if sqlEe.sqldb != nil {
|
||||
err = sqlEe.sqldb.Close()
|
||||
}
|
||||
sqlEe.db = nil
|
||||
sqlEe.sqldb = nil
|
||||
sqlEe.Unlock()
|
||||
|
||||
Reference in New Issue
Block a user