Before one only gets the generic error "TLS handshake failed". Now one gets
more details error messages plus the problematic certificate. This should
be helpful for debugging.
Syncthing can report an "idle" status despite pull errors. This still means
the directory is out-of-sync. With this change the out-of-sync status is
only cleared when reading a "FolderSummary" event without pull errors (or
temporarily if the directory is e.g. scanning).
Syncthing's official web UI also does the first query for events like this.
This should make loading times a bit faster and removes the possibility of
picking-up obsolete events (which was always problematic).
* Use local time consistently for timestamps which might get displayed
within the UI, e.g. the dir status was in one case set to the local time
and in other cases GMT was used which could lead to discarding status
updates
* Print warning when timestamp parsing fails (instead of ignoring it
silently)
* Set directory status from folder status response even when parsing the
timestamp fails
* Catch possible exception when printing log timestamps in syncthingctl
so the handler is not called while looping through the
list of these replies to abort them. The handler must
not be called in that situation because it mutates the
list.
* Ensure previous long polling requests for events are aborted
before connecting again
* Ensure results from previous requests are always discarded
after aborting to reconnect
* Rely not only on the FolderErrors event
* Request pull errors when opening the dialog
* Use "pullErrors" from FolderSummary
* Move code for directory error dialog into
its own class
This should fix that sometimes obsolete errors
were still displayed or actually present errors
missing.
* Discard folder errors older than the last "sync" state
* Unfortunately we don't know the the time of the last
sync from the beginning. To prevent showing obsolete
errors in this state, discard all errors if the status
changes to something other than "out-of-syn".