mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 10:06:24 +05:00
Prevent deadlock inside *els Connect
This commit is contained in:
committed by
Dan Christian Bogos
parent
e48eb5df13
commit
d5aa567e98
@@ -160,12 +160,12 @@ func (eEe *ElasticEE) Cfg() *config.EventExporterCfg { return eEe.cfg }
|
||||
|
||||
func (eEe *ElasticEE) Connect() (err error) {
|
||||
eEe.Lock()
|
||||
defer eEe.Unlock()
|
||||
// create the client
|
||||
if eEe.eClnt != nil {
|
||||
return
|
||||
}
|
||||
eEe.eClnt, err = elasticsearch.NewClient(eEe.clnOpts)
|
||||
eEe.Unlock()
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user