ralph-irving / squeezeos-squeezeplay

Squeezeplay in Logitech Controller, Radio and Touch Squeezebox players community firmware
11 stars 6 forks source link

Bugfix: Manually repairing network may lock up UI on failure #6

Closed mw9 closed 3 years ago

mw9 commented 3 years ago

This proposed change hardens up the "Repair network" option in the SqueezeOS diagnostics menu, under "Network Health" in the Diagnostics menu.

Forum member P Nelson reported that an attempt to repair his Radio's network caused the Radio's UI to lock up, requiring a forced shutdown to recover matters. I subsequently confirmed the issue myself.

https://forums.slimdevices.com/showthread.php?113479-Announce-Community-Firmware-for-Squeezebox-Radio-Touch-Controller-and-LMS-8&p=1011202&viewfull=1#post1011202

I have located the basic cause - the "Repair Network" option is not simply resilient to failure.

The proposed change explicitly deals with one known cause of failure. Other potential, but unknown, failures are catered for by implementing a "timer backstop" that will free the UI if the "repair" is not completed within 20 seconds. This should be more than enough time.

I have tested the change on a Radio and a Controller, and both appear to work as expected, with no apparent adverse side effects. I do not have a Touch, so I have not been able to check operation there, although I would not anticipate any difference in behaviour.

ralph-irving commented 3 years ago

I'll test this on the touch later this week.

ralph-irving commented 3 years ago

I tested this on the touch today without any issues, so I will merge this shortly.