summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim <wim@42.be>2021-10-24 19:00:15 +0200
committerGitHub <noreply@github.com>2021-10-24 19:00:15 +0200
commit46e4317b77d686a626d37f2eb1c85c6c19f6b665 (patch)
treeeee9a6b9994cb4fe2afc8696927c4efd57421593
parente3ffbcadd82d71e87e7f5841f9a037f9358a010b (diff)
downloadmatterbridge-msglm-46e4317b77d686a626d37f2eb1c85c6c19f6b665.tar.gz
matterbridge-msglm-46e4317b77d686a626d37f2eb1c85c6c19f6b665.tar.bz2
matterbridge-msglm-46e4317b77d686a626d37f2eb1c85c6c19f6b665.zip
Keep the logger on a disabled bridge. Fixes #1616 (#1621)
-rw-r--r--bridge/matrix/matrix.go3
-rw-r--r--gateway/router.go4
2 files changed, 6 insertions, 1 deletions
diff --git a/bridge/matrix/matrix.go b/bridge/matrix/matrix.go
index b50c9d8b..e89002b2 100644
--- a/bridge/matrix/matrix.go
+++ b/bridge/matrix/matrix.go
@@ -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)
}
diff --git a/gateway/router.go b/gateway/router.go
index 468f02c8..a0d5f402 100644
--- a/gateway/router.go
+++ b/gateway/router.go
@@ -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