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:
parent
de7d7f62a4
commit
364f8388ed
|
@ -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(),
|
||||||
|
|
Loading…
Reference in a new issue