From 1645c0694d5d6f147d6a9c271dce34b8b2761a29 Mon Sep 17 00:00:00 2001 From: KubaZ2 Date: Mon, 10 Nov 2025 18:28:20 +0100 Subject: [PATCH] Increase socket discovery timeout to 5 seconds Updated the default value for `_externalSocketAddressDiscoveryTimeout` in the `VoiceClient` class from 500 milliseconds to 5 seconds. This change improves reliability in slower network environments by allowing more time for external socket address discovery. --- NetCord/Gateway/Voice/VoiceClient.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NetCord/Gateway/Voice/VoiceClient.cs b/NetCord/Gateway/Voice/VoiceClient.cs index e7cc048c..588594ed 100644 --- a/NetCord/Gateway/Voice/VoiceClient.cs +++ b/NetCord/Gateway/Voice/VoiceClient.cs @@ -111,7 +111,7 @@ public void Dispose() _udpConnectionProvider = configuration.UdpConnectionProvider ?? UdpConnectionProvider.Instance; _encryptionProvider = configuration.EncryptionProvider ?? VoiceEncryptionProvider.Instance; _receiveHandler = configuration.ReceiveHandler ?? NullVoiceReceiveHandler.Instance; - _externalSocketAddressDiscoveryTimeout = configuration.ExternalSocketAddressDiscoveryTimeout.GetValueOrDefault(new(500 * TimeSpan.TicksPerMillisecond)); + _externalSocketAddressDiscoveryTimeout = configuration.ExternalSocketAddressDiscoveryTimeout.GetValueOrDefault(new(5 * TimeSpan.TicksPerSecond)); } private protected override ValueTask SendIdentifyAsync(ConnectionState connectionState, CancellationToken cancellationToken = default)