1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-10-04 00:29:04 +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. // *: State doesn't actually keep track of pinned messages.
readyMu sync.Mutex readyMu *sync.Mutex
ready gateway.ReadyEvent ready gateway.ReadyEvent
// StateLog logs all errors that come from the state cache. This includes // 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, Store: store,
Handler: handler.New(), Handler: handler.New(),
StateLog: func(err error) {}, StateLog: func(err error) {},
readyMu: new(sync.Mutex),
fewMessages: map[discord.ChannelID]struct{}{}, fewMessages: map[discord.ChannelID]struct{}{},
fewMutex: new(sync.Mutex), fewMutex: new(sync.Mutex),
unavailableGuilds: moreatomic.NewGuildIDSet(), unavailableGuilds: moreatomic.NewGuildIDSet(),