diff options
-rw-r--r-- | bridge/matrix/matrix.go | 3 | ||||
-rw-r--r-- | gateway/router.go | 4 |
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 |