fix: correctly stop agents
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
@@ -198,6 +198,7 @@ var ErrContextCanceled = fmt.Errorf("context canceled")
|
||||
func (a *Agent) Stop() {
|
||||
a.Lock()
|
||||
defer a.Unlock()
|
||||
xlog.Debug("Stopping agent", "agent", a.Character.Name)
|
||||
a.context.Cancel()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user