Skip to content
This repository has been archived by the owner on Jul 11, 2024. It is now read-only.

Commit

Permalink
Prevent panic for unrecognized INTEGRATION_CREATE messages (#339)
Browse files Browse the repository at this point in the history
Co-authored-by: EpsilonPrime <[email protected]>
  • Loading branch information
EpsilonPrime and EpsilonPrime authored Oct 17, 2020
1 parent 11a9fa0 commit 562772b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions reactor.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ func (c *Client) demultiplexer(d *dispatcher, read <-chan *gateway.Event) {
}

resourceI, _ := cacheDispatcher(c.cache, evt.Name, evt.Data)
if resourceI == nil {
d.session.Logger().Error(fmt.Errorf("no cache"), "EVENT DATA: `", string(evt.Data), "`, EVENT: `", evt.Name, "` -- DECISION: IGNORED")
continue
}
resource := resourceI.(evtResource)

ctx := context.Background()
Expand Down

0 comments on commit 562772b

Please sign in to comment.