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
2be78a74c1
commit
a23c8218d3
@@ -147,7 +147,9 @@ func (sqlEe *SQLEe) ExportEvent(_ *context.Context, req interface{}, _ string) e
|
||||
|
||||
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