Use Discord heartbeat interval in audio. (#2765)
Reduce heartbeat interval to ensure Discord receives it within range. Refactor some AudioClient code. Co-authored-by: Quin Lynch <49576606+quinchs@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
8d5022acb8
commit
9cedfbcdd9
@@ -238,6 +238,15 @@ namespace Discord
|
||||
/// </summary>
|
||||
public const int MaxApplicationTagCount = 5;
|
||||
|
||||
/// <summary>
|
||||
/// Returns the factor to reduce the heartbeat interval.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// If a heartbeat takes longer than the interval estimated by Discord, the connection will be closed.
|
||||
/// This factor is used to reduce the interval and ensure that Discord will get the heartbeat within the estimated interval.
|
||||
/// </remarks>
|
||||
internal const double HeartbeatIntervalFactor = 0.9;
|
||||
|
||||
/// <summary>
|
||||
/// Returns the maximum length of a voice channel status.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user