waxlamp / elgato

Control program for El Gato brand keylights
Apache License 2.0
9 stars 0 forks source link

Fix issues with out-of-sync light lists #16

Closed waxlamp closed 3 years ago

waxlamp commented 3 years ago

This PR solves the problem of the software crashing or hanging when the list of lights goes out of sync with reality.

Now, as the lights in the saved list are constructed, any failures are reported, with a suggestion to re-run light discovery. The issue of hanging (or other network request failures) is solved somewhat inelegantly by forcing a two-second timeout on all GET requests via a monkeypatch on the requests module.

This PR also delays the construction of the discovered light list until it is needed.

Closes #15.

pklaus commented 3 years ago

Well done. Behaves nicely now when previously discovered lights aren't reachable on the network.