@@ -158,12 +158,14 @@ func (a *AgentPool) CreateAgent(name string, agentConfig *AgentConfig) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
go func(ac AgentConfig) {
|
defer 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)
|
||||||
}
|
}
|
||||||
}(*agentConfig)
|
}(ac, pool)
|
||||||
|
}(*agentConfig, a)
|
||||||
|
|
||||||
return a.startAgentWithConfig(name, agentConfig)
|
return a.startAgentWithConfig(name, agentConfig)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user