mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Prevent deadlock inside *els Connect
This commit is contained in:
committed by
Dan Christian Bogos
parent
a05834af81
commit
5bd439020c
@@ -161,12 +161,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.clntOpts)
|
||||
eEe.Unlock()
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user