mirror of
https://github.com/diamondburned/arikawa.git
synced 2024-11-16 20:03:38 +00:00
Gateway: Fixed a deadlocking mutex
This commit is contained in:
parent
0aebea60bd
commit
403e4970f7
|
@ -174,9 +174,6 @@ func (g *Gateway) Close() error {
|
||||||
func (g *Gateway) Reconnect() error {
|
func (g *Gateway) Reconnect() error {
|
||||||
WSDebug("Reconnecting...")
|
WSDebug("Reconnecting...")
|
||||||
|
|
||||||
g.available.Lock()
|
|
||||||
defer g.available.Unlock()
|
|
||||||
|
|
||||||
// If the event loop is not dead:
|
// If the event loop is not dead:
|
||||||
if g.paceDeath != nil {
|
if g.paceDeath != nil {
|
||||||
WSDebug("Gateway is not closed, closing before reconnecting...")
|
WSDebug("Gateway is not closed, closing before reconnecting...")
|
||||||
|
|
Loading…
Reference in a new issue