Stylophone icon indicating copy to clipboard operation
Stylophone copied to clipboard

Connecting on another mpd instance after being already connected

Open ZetaKebab opened this issue 2 years ago • 1 comments

Hi! There's an issue I encountered on Stylophone: if I try to connect to another mpd instance after being already connected to another one, strange behaviours will happen:

  • the old song playing will still be displayed after being connected to the new one
  • trying to change the status of the song will display to new one, but then be stuck for a while

I've looked a bit around, it seems to be InitializeStatusUpdater function that doesn't get properly cancelled. This break gets called a bit late:

if (token.IsCancellationRequested || _idleConnection == null)
      break;

I've not checked if this is due to how it is done within MpcNET, but it seems disconnecting causes issues. Honestly, it's not a user behaviour I would expect to be really common, but I'd thought I'd let you know this minor issue exists.

ZetaKebab avatar Apr 11 '22 23:04 ZetaKebab

Thanks for this report -- I admittedly haven't tested dual mpd instances much since that's not something I do personally, so it's likely the disconnecting logic doesn't clean up well enough. 😅

Making the connectionservice more robust would also help with https://github.com/Difegue/Stylophone/issues/22 whenever I find the motivation to do it. 🤠

Difegue avatar Apr 12 '22 10:04 Difegue

Fixed by https://github.com/Difegue/Stylophone/pull/56/commits/7d831d834ee44875ce0c144b6764dd9b1ed8e127 while I was working out kinks in the iOS port -- Should be much better now!

Difegue avatar Sep 17 '22 20:09 Difegue