5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-21 21:40:27 +00:00

Keep the logger on a disabled bridge. Fixes #1616 (#1621)

This commit is contained in:
Wim 2021-10-24 19:00:15 +02:00 committed by GitHub
parent e3ffbcadd8
commit 46e4317b77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -301,6 +301,9 @@ func (b *Bmatrix) handlematrix() {
syncer.OnEventType("m.room.member", b.handleMemberChange) syncer.OnEventType("m.room.member", b.handleMemberChange)
go func() { go func() {
for { for {
if b == nil {
return
}
if err := b.mc.Sync(); err != nil { if err := b.mc.Sync(); err != nil {
b.Log.Println("Sync() returned ", err) b.Log.Println("Sync() returned ", err)
} }

View File

@ -110,7 +110,9 @@ func (r *Router) disableBridge(br *bridge.Bridge, err error) bool {
if r.BridgeValues().General.IgnoreFailureOnStart { if r.BridgeValues().General.IgnoreFailureOnStart {
r.logger.Error(err) r.logger.Error(err)
// setting this bridge empty // setting this bridge empty
*br = bridge.Bridge{} *br = bridge.Bridge{
Log: br.Log,
}
return true return true
} }
return false return false