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)
go func() {
for {
if b == nil {
return
}
if err := b.mc.Sync(); err != nil {
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 {
r.logger.Error(err)
// setting this bridge empty
*br = bridge.Bridge{}
*br = bridge.Bridge{
Log: br.Log,
}
return true
}
return false