forked from MirrorHub/mautrix-whatsapp
Fix custom puppet start loop
This commit is contained in:
parent
3345615fc0
commit
4a13ae731a
1 changed files with 3 additions and 3 deletions
6
main.go
6
main.go
|
@ -198,14 +198,14 @@ func (bridge *Bridge) StartUsers() {
|
|||
go user.Connect(false)
|
||||
}
|
||||
bridge.Log.Debugln("Starting custom puppets")
|
||||
for _, puppet := range bridge.GetAllPuppetsWithCustomMXID() {
|
||||
go func() {
|
||||
for _, loopuppet := range bridge.GetAllPuppetsWithCustomMXID() {
|
||||
go func(puppet *Puppet) {
|
||||
puppet.log.Debugln("Starting custom puppet", puppet.CustomMXID)
|
||||
err := puppet.StartCustomMXID()
|
||||
if err != nil {
|
||||
puppet.log.Errorln("Failed to start custom puppet:", err)
|
||||
}
|
||||
}()
|
||||
}(loopuppet)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue