Only join threads if they were made in the first place
This commit is contained in:
@@ -167,8 +167,10 @@ namespace Discord.WebSockets.Voice
|
|||||||
protected override Task Cleanup()
|
protected override Task Cleanup()
|
||||||
{
|
{
|
||||||
#if USE_THREAD
|
#if USE_THREAD
|
||||||
_sendThread.Join();
|
if (_sendThread != null)
|
||||||
_receiveThread.Join();
|
_sendThread.Join();
|
||||||
|
if (_receiveThread != null)
|
||||||
|
_receiveThread.Join();
|
||||||
_sendThread = null;
|
_sendThread = null;
|
||||||
_receiveThread = null;
|
_receiveThread = null;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user