Add missing crypto != nil checks
This commit is contained in:
parent
8bb5407f98
commit
b4949eec59
4
main.go
4
main.go
@ -254,7 +254,9 @@ func (bridge *Bridge) Start() {
|
|||||||
bridge.Log.Debugln("Starting event processor")
|
bridge.Log.Debugln("Starting event processor")
|
||||||
go bridge.EventProcessor.Start()
|
go bridge.EventProcessor.Start()
|
||||||
go bridge.UpdateBotProfile()
|
go bridge.UpdateBotProfile()
|
||||||
|
if bridge.Crypto != nil {
|
||||||
go bridge.Crypto.Start()
|
go bridge.Crypto.Start()
|
||||||
|
}
|
||||||
go bridge.StartUsers()
|
go bridge.StartUsers()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -319,7 +321,9 @@ func (bridge *Bridge) StartUsers() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (bridge *Bridge) Stop() {
|
func (bridge *Bridge) Stop() {
|
||||||
|
if bridge.Crypto != nil {
|
||||||
bridge.Crypto.Stop()
|
bridge.Crypto.Stop()
|
||||||
|
}
|
||||||
bridge.AS.Stop()
|
bridge.AS.Stop()
|
||||||
bridge.EventProcessor.Stop()
|
bridge.EventProcessor.Stop()
|
||||||
for _, user := range bridge.usersByJID {
|
for _, user := range bridge.usersByJID {
|
||||||
|
Loading…
Reference in New Issue
Block a user