Skip to content

fix(voice): correct UDP keep-alive interval unit - #3436

Merged
plun1331 merged 6 commits into
masterfrom
fix/udp-keepalive-interval
Nov 11, 2026
Merged

plun1331 merged 6 commits into
masterfrom
fix/udp-keepalive-interval

Conversation

@vmphase

@vmphase vmphase commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

Summary

Currently the voice receiver's thread sleeps ~83 minutes instead of 5 seconds which is subnormal. However, e.g. djs or DisCatSharp sleep for 5 seconds (Task.Delay in C# and setInterval in JS accept milliseconds).

UPD: Fixes #3388.

Information

  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed).
  • This PR is not a code change (e.g. documentation, README, typehinting,
    examples, ...).

Checklist

  • I have searched the open pull requests for duplicates.
  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • If type: ignore comments were used, a comment is also left explaining why.
  • I have updated the changelog to include these changes.
  • I have read the Contributing Guidelines.
  • AI Usage has been disclosed.
    • If AI has been used, I understand fully what the code does

@vmphase
vmphase requested review from a team and Icebluewolf November 8, 2026 17:32
@vmphase
vmphase requested a review from a team as a code owner November 8, 2026 17:32
@github-project-automation github-project-automation Bot moved this to Todo in Pycord Nov 8, 2026
@pycord-app

pycord-app Bot commented Nov 8, 2026

Copy link
Copy Markdown

Thanks for opening this pull request!
Please make sure you have read the Contributing Guidelines and Code of Conduct.

This pull request can be checked-out with:

git fetch origin pull/3436/head:pr-3436
git checkout pr-3436

This pull request can be installed with:

pip install git+https://github.com/Pycord-Development/pycord@refs/pull/3436/head

@vmphase

vmphase commented Nov 8, 2026

Copy link
Copy Markdown
Member Author

Git blames @Lulalaby introducing this in #3143 and I assume that's because of the mix between Python's time.sleep(), which accept seconds, and C#'s Task.Delay(), which accepts milliseconds. Ultimately, pycord already uses float type for other seconds constants and since delay is not used anywhere else internally and UDPKeepAlive is not documented, it is not considered as a breaking change.

Not sure if this one needs a changelog @Paillat-dev (?)

@Paillat-dev

Copy link
Copy Markdown
Member

@vmphase can you please check if this is in #3159

@Paillat-dev
Paillat-dev self-requested a review November 8, 2026 17:42
@Paillat-dev Paillat-dev self-assigned this Nov 8, 2026
@vmphase

vmphase commented Nov 8, 2026

Copy link
Copy Markdown
Member Author

@vmphase can you please check if this is in #3159

It is not.

@Paillat-dev

Copy link
Copy Markdown
Member

@vmphase that PR was largely by DA344 + me btw not Lala, she just opened the PR, so she is not to blame if anything

@Paillat-dev

Copy link
Copy Markdown
Member

We do have an issue too lol #3388

@Paillat-dev Paillat-dev linked an issue Nov 8, 2026 that may be closed by this pull request
4 tasks done
@Paillat-dev

Copy link
Copy Markdown
Member

Yes please changelog @vmphase, thx

@vmphase

vmphase commented Nov 8, 2026

Copy link
Copy Markdown
Member Author

We do have an issue too lol #3388

I really wonder what sdeparte/kb-meeting-agent#1 is, and why did it mention that issue 🤔

@Paillat-dev Paillat-dev added hold: changelog This pull request is missing a changelog entry voice Related to the voice chat feature labels Nov 8, 2026
@vmphase
vmphase requested a review from a team as a code owner November 8, 2026 17:46
@vmphase
vmphase requested a review from a team November 8, 2026 17:46
Comment thread CHANGELOG.md Resolved
@Paillat-dev Paillat-dev removed the hold: changelog This pull request is missing a changelog entry label Nov 8, 2026
@plun1331
plun1331 enabled auto-merge (squash) November 8, 2026 20:26
@plun1331
plun1331 merged commit 002c7d3 into master Nov 11, 2026
27 of 41 checks passed
@plun1331
plun1331 deleted the fix/udp-keepalive-interval branch November 11, 2026 10:47
@github-project-automation github-project-automation Bot moved this from Todo to Done in Pycord Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

voice Related to the voice chat feature

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Voice receive stops after a few minutes: UDPKeepAlive sleeps 5000 seconds

4 participants