Merge pull request #17 from gcggcg/gcg_kis-flow

修复CallConnector并发读写问题
This commit is contained in:
刘丹冰 2024-04-01 16:48:31 +08:00 committed by GitHub
commit dc5d9a3d82
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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)