Better handle Syncthing's certificate renewal
Syncthing sometimes re-generates its HTTPs certificate:
[INFO] Loading HTTPS certificate: certificate will soon expire
[INFO] Creating new HTTPS certificate
[INFO] TCP listener ([::]:22000) starting
At this point this leads to tons of TLS errors on startup. The TLS error goes away by explicitly re-connecting from the settings. There's room for improvement:
- Suppress TLS errors in the time frame these log messages occur in Syncthing's log. This will at least help if Syncthing is started via the built-in launcher.
- Ensure the certificate is re-loaded automatically after running into an error so one doesn't need to re-connect from the settings manually.
This should be fixed by https://github.com/Martchus/syncthingtray/commit/07ff8a5c1b47e90472fd518791324c5a04ad42e4 where I now decided to simply reload the certificate before emitting any errors (so the first point is not necessary). Not sure whether it works because I only tested this in a rather artificial way.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I haven't seen the error anymore so I suppose this worked.