Skip to content

Conversation

todorangrg
Copy link

this only fixed the issue I was having in #1359. Now user-switch works reliably.

@MrZoltan
Copy link

MrZoltan commented Sep 12, 2025

@todorangrg Hello, I think I am impacted by the same issue as you when I switch users, sometimes the "connecting keep flashing" and end up not connecting. I have pulled the spotifyd version with your fix and I have an error (below) any idea why ?

I compile with : "cargo build --release --no-default-features --features pulseaudio_backend,dbus_mpris"

Compiling spotifyd v0.4.1 (/home/media/spotifyd.v0.4.1-fix1361/spotifyd)
warning: struct `ParseError` is never constructed
 --> src/error.rs:7:12
  |
7 | pub struct ParseError(String);
  |            ^^^^^^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: hiding a lifetime that's elided elsewhere is confusing
   --> src/dbus_mpris.rs:389:13
    |
389 |     fn read(&self) -> Result<std::sync::RwLockReadGuard<CurrentStateInner>, StatePoisonError> {
    |             ^^^^^            --------------------------------------------- the same lifetime is hidden here
    |             |
    |             the lifetime is elided here
    |
    = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
    = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
help: use `'_` for type paths
    |
389 |     fn read(&self) -> Result<std::sync::RwLockReadGuard<'_, CurrentStateInner>, StatePoisonError> {
    |                                                         +++

warning: hiding a lifetime that's elided elsewhere is confusing
   --> src/dbus_mpris.rs:393:14
    |
393 |     fn write(&self) -> Result<std::sync::RwLockWriteGuard<CurrentStateInner>, StatePoisonError> {
    |              ^^^^^            ---------------------------------------------- the same lifetime is hidden here
    |              |
    |              the lifetime is elided here
    |
    = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
help: use `'_` for type paths
    |
393 |     fn write(&self) -> Result<std::sync::RwLockWriteGuard<'_, CurrentStateInner>, StatePoisonError> {
    |                                                           +++

    Building [=======================> ] 445/446: spotifyd(bin)

Thanks

@eladyn
Copy link
Member

eladyn commented Sep 15, 2025

@todorangrg The log you pasted only shows two warning messages (which were already present on master and I fixed them now). I just rebased this branch onto the latest changes, so maybe you can try again? (Compiling might take a little...)

Copy link
Member

@eladyn eladyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for taking so long to review this! Looks good though, thank you! There are a few other places, where shared_spirc.shutdown() is called. Would it be possible to await the spirc_task there as well?

@MrZoltan
Copy link

MrZoltan commented Sep 16, 2025

@todorangrg The log you pasted only shows two warning messages (which were already present on master and I fixed them now). I just rebased this branch onto the latest changes, so maybe you can try again? (Compiling might take a little...)

Hi,
I just tested and the compilation is fine, and the user switching also. (Debian 12)
Thanks a lot.

@todorangrg
Copy link
Author

done.

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 this pull request may close these issues.

3 participants