Commit Graph

2 Commits

Author SHA1 Message Date
Martchus 843f164df1 Avoid potentially losing events
I have observed that Syncthing Tray can get stuck thinking a remote device
still needs data. Likely the update got lost. The code contains certain
conditions in which folder completion events and requesting completion are
supressed. Those conditions are based on timestamps. That is not ideal as
the accuracy is only one second (so different timestamps might be
considered equal as they are rounded to be the same). Additionally, it
makes no sense to assume a timestamp upon receiving a response as the
information might be older than the time it was received.

This change avoids those conditions. It rather uses the event ID to
decide what event/reply is newer.

This change also uses quint64 instead of int for event IDs to avoid running
into an overflow (or rather conversion error) when deserializing the ID
which might be bigger than int. (Not sure how big the ID can become; this
is to be on the safe side.)
2023-04-15 16:18:23 +02:00
Martchus 96e92f13a3 Avoid relying on symlink for include directories
Symlinks aren't working very well with Git under Windows so better avoid
them.
2023-02-27 18:27:33 +01:00