1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-11-30 18:53:30 +00:00

State: Fixed a mutex copy

This commit is contained in:
diamondburned 2020-11-17 10:59:12 -08:00
parent de7d7f62a4
commit 364f8388ed

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(),