State: Fixed a mutex copy

This commit is contained in:
diamondburned 2020-11-17 10:59:12 -08:00
parent de7d7f62a4
commit 364f8388ed
1 changed files with 2 additions and 1 deletions

View File

@ -62,7 +62,7 @@ type State struct {
// *: State doesn't actually keep track of pinned messages.
readyMu sync.Mutex
readyMu *sync.Mutex
ready gateway.ReadyEvent
// StateLog logs all errors that come from the state cache. This includes
@ -128,6 +128,7 @@ func NewFromSession(s *session.Session, store Store) (*State, error) {
Store: store,
Handler: handler.New(),
StateLog: func(err error) {},
readyMu: new(sync.Mutex),
fewMessages: map[discord.ChannelID]struct{}{},
fewMutex: new(sync.Mutex),
unavailableGuilds: moreatomic.NewGuildIDSet(),