修复CallConnector并发读写问题

This commit is contained in:
葛春光 2024-04-01 13:51:17 +08:00
parent fe5e08feb9
commit 44b74aec2b

View File

@ -213,6 +213,8 @@ func (pool *kisPool) CaaS(cname string, fname string, mode common.KisMode, c Caa
// CallConnector 调度 Connector
func (pool *kisPool) CallConnector(ctx context.Context, flow Flow, conn Connector, args interface{}) error {
pool.cLock.RLock() // 读锁
defer pool.cLock.RUnlock()
fn := flow.GetThisFunction()
fnConf := fn.GetConfig()
mode := common.KisMode(fnConf.FMode)