go2rtc
go2rtc copied to clipboard
Auto-restart go2rtc on error pattern
I needed to increase the reliability of go2rtc by removing the need of manually restarting it in such error conditions.
- This PR builds on #72
- It has to be merged only after #72
- Partially fixes #39 and partially fixes #87
- We may need to add more error patterns
- This is not a definitive solution. Ideally go2rtc should detect the issue by itself and do the needful to restart the stream without requiring to restart the whole app (which cause the Hass API from being unavailable for some seconds -- probably causing any player to error out)
- Nevertheless this is better than the current approach, which should help until the definitive fix comes in

I switched the implementation a little, now the watchdog will only restart the go2rtc service rather than restarting the whole add-on/container, which should make the restart a lot faster.
I don't use Docker myself, so looking forward to this enhancement making it to the regular binaries as well at some point :)
- This should not be needed anymore since #39 got resolved.