From 9da01cccb33cd56b74194d77046cb5462023ebca Mon Sep 17 00:00:00 2001 From: "diamondburned (Forefront)" Date: Wed, 20 May 2020 15:05:39 -0700 Subject: [PATCH] Voice: Fixed a potential Write() stalling bug --- voice/udp/udp.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/voice/udp/udp.go b/voice/udp/udp.go index 96288a5..f4ba5e1 100644 --- a/voice/udp/udp.go +++ b/voice/udp/udp.go @@ -134,6 +134,9 @@ func (c *Connection) Start(secret *[32]byte) { select { case <-frequency.C: case <-c.close: + // Prevent Write() from stalling before exiting. + c.reply <- nil + return }