Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid endpoint makes request never return #23

Open
vicky5124 opened this issue Mar 10, 2024 · 1 comment
Open

Invalid endpoint makes request never return #23

vicky5124 opened this issue Mar 10, 2024 · 1 comment

Comments

@vicky5124
Copy link

Sending a PATCH request with invalid data results in a request that never finishes.

curl -H "Authorization: $LAVALINK_PASSWORD" http://localhost:2333/v4/sessions/3qygjqfuvxcejpug/players/182892283111276544 -i -X PATCH --json '{"voice" : {"token" : "02ab32bd6b39aaf3", "endpoint" : "wss://madrid253.discord.media:443", "sessionId" : "4541df6f11175d3f34b3baedb7b57a0d"}}'

Tested with this cURL command, where the invalid data is an endpoint that includes the protocol, and the command never finished, even after running for over an hour.

"endpoint" : "wss://madrid253.discord.media:443"
This is "invalid" and causes this issue

"endpoint" : "madrid253.discord.media:443"
This works completely fine

This is not intended behaviour, being permanently stuck waiting for a response, in an infinite await, or running out of threads in a pool because of a failed request that could easily return an error, or have the invalid information stripped, or time out.

I brought the issue up in the lavalink discord server, and Topi suggested it was a Koe issue.

@alula
Copy link
Member

alula commented Mar 12, 2024

Probably, the connect() implementation looks flawed on quick look: https://github.com/KyokoBot/koe/blob/master/core/src/main/java/moe/kyokobot/koe/internal/MediaConnectionImpl.java#L47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants