Martchus / syncthingtray

Tray application and Dolphin/Plasma integration for Syncthing
https://martchus.github.io/syncthingtray/
Other
1.5k stars 42 forks source link

Better handle Syncthing's certificate renewal #226

Closed Martchus closed 3 months ago

Martchus commented 5 months ago

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:

Martchus commented 5 months ago

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.

stale[bot] commented 3 months ago

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.

Martchus commented 3 months ago

I haven't seen the error anymore so I suppose this worked.