mirror of
https://mau.dev/mautrix/go.git
synced 2026-03-14 14:25:53 +01:00
bridgev2/portal: don't allow queuing events into uninitialized portals
Some checks failed
Some checks failed
This commit is contained in:
parent
fbf8718e22
commit
0012a23d85
1 changed files with 3 additions and 0 deletions
|
|
@ -303,6 +303,9 @@ func (portal *Portal) queueEvent(ctx context.Context, evt portalEvent) EventHand
|
|||
portal.eventIdx++
|
||||
return portal.handleSingleEventWithDelayLogging(portal.eventIdx, evt)
|
||||
} else {
|
||||
if portal.events == nil {
|
||||
panic(fmt.Errorf("queueEvent into uninitialized portal %s", portal.PortalKey))
|
||||
}
|
||||
select {
|
||||
case portal.events <- evt:
|
||||
return EventHandlingResultQueued
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue