@@ -158,14 +158,12 @@ func (a *AgentPool) CreateAgent(name string, agentConfig *AgentConfig) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
defer func(ac AgentConfig, pool *AgentPool) {
|
go func(ac AgentConfig, pool *AgentPool) {
|
||||||
go func(ac AgentConfig, pool *AgentPool) {
|
// Create the agent avatar
|
||||||
// Create the agent avatar
|
if err := a.createAgentAvatar(ac); err != nil {
|
||||||
if err := a.createAgentAvatar(ac); err != nil {
|
xlog.Error("Failed to create agent avatar", "error", err)
|
||||||
xlog.Error("Failed to create agent avatar", "error", err)
|
}
|
||||||
}
|
}(a.pool[name], a)
|
||||||
}(ac, pool)
|
|
||||||
}(*agentConfig, a)
|
|
||||||
|
|
||||||
return a.startAgentWithConfig(name, agentConfig)
|
return a.startAgentWithConfig(name, agentConfig)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user