Skip to content

Client::sticker() hangs when fetching a nonexistant sticker #78

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

Open
nejni-marji opened this issue Mar 16, 2025 · 1 comment · May be fixed by #81
Open

Client::sticker() hangs when fetching a nonexistant sticker #78

nejni-marji opened this issue Mar 16, 2025 · 1 comment · May be fixed by #81

Comments

@nejni-marji
Copy link

example scenario:

use mpd::Client;

fn main() {
    let address = "127.0.0.1:6600";
    let mut client = Client::connect(address).unwrap();

    let song = client.currentsong().unwrap().unwrap();
    let file = &song.file;
    println!("{:?}", &song);

    let sticker = client.sticker("song", &file, "DOES NOT EXIST");
    println!("{sticker:?}");
}

expected behavior:
immediately return Err()

observed behavior:
long delay before returning Err()

additional information:
the server is running MPD v0.24, which is a recent update with protocol changes surrounding stickers. this probably has something to do with the bug

@nejni-marji
Copy link
Author

i found the bug

nejni-marji@0804f94

i will be submitting a PR. my code fixes the bug in an obviously inappropriate way, but i also don't understand what the correct syntax is and it will probably be very obvious to you

@nejni-marji nejni-marji linked a pull request Mar 29, 2025 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant