On my development machine everything works fine but as soon as I upload the program to a server in a firewalled environment it hangs in VoiceBuffer.cs on line 56.
To at least throw an exception. I've whitelisted my application in the Windows firewall and turned off UDP DDOS mitigation. Furthermore, opened ports 50.000 to 65535 UDP just to be sure.
I am not able to debug on the server right now. I realize it might be hard to resolve like this, merely looking for ideas on where to look.
Once I have time I can set up a development environment on the server itself to see what's up. I've found above by turning on logging and forcing a disconnect. It returned the following exception:
System.OperationCanceledException: Client is disconnected. ---> System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.ManualResetEventSlim.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at Discord.Audio.VoiceBuffer.Push(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancelToken) in Discord.Net.Audio\VoiceBuffer.cs:line 56
--- End of inner exception stack trace ---
at Discord.Audio.VoiceBuffer.Push(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancelToken) in Discord.Net.Audio\VoiceBuffer.cs:line 60
at Discord.Audio.AudioClient.Send(Byte[] data, Int32 offset, Int32 count) in Discord.Net.Audio\AudioClient.cs:line 240
On my development machine everything works fine but as soon as I upload the program to a server in a firewalled environment it hangs in VoiceBuffer.cs on line 56.
_notOverflowEvent.Wait(cancelToken);
It does so indefinitely so I changed the code to
_notOverflowEvent.Wait(TimeSpan.FromMinutes(1), cancelToken);
To at least throw an exception. I've whitelisted my application in the Windows firewall and turned off UDP DDOS mitigation. Furthermore, opened ports 50.000 to 65535 UDP just to be sure.
I am not able to debug on the server right now. I realize it might be hard to resolve like this, merely looking for ideas on where to look. Once I have time I can set up a development environment on the server itself to see what's up. I've found above by turning on logging and forcing a disconnect. It returned the following exception: