mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-12-16 18:33:49 +01:00
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)
|
go user.Connect(false)
|
||||||
}
|
}
|
||||||
bridge.Log.Debugln("Starting custom puppets")
|
bridge.Log.Debugln("Starting custom puppets")
|
||||||
for _, puppet := range bridge.GetAllPuppetsWithCustomMXID() {
|
for _, loopuppet := range bridge.GetAllPuppetsWithCustomMXID() {
|
||||||
go func() {
|
go func(puppet *Puppet) {
|
||||||
puppet.log.Debugln("Starting custom puppet", puppet.CustomMXID)
|
puppet.log.Debugln("Starting custom puppet", puppet.CustomMXID)
|
||||||
err := puppet.StartCustomMXID()
|
err := puppet.StartCustomMXID()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
puppet.log.Errorln("Failed to start custom puppet:", err)
|
puppet.log.Errorln("Failed to start custom puppet:", err)
|
||||||
}
|
}
|
||||||
}()
|
}(loopuppet)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue