Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refactored the pinging logic to handle a couple edge cases better
Ttl for online broadcast messages is now only 1 min
More sensible variable names for ping related things
Now ping our contacts that go offline every 2 mins to check if they are back online
Ping our contacts if they sent us a storage server message in the last 2 mins
Along the way I stumbled across a couple bugs in the snode logic that would cause the nodes to always be removed on the first error rather than trying 3 times, and changed the logging to print a warning for the first 2 failures of a snode and then an error when it is removed from memory
Although I didn't end up actually doing a debounce for the pings (because it would have made the system less reliable), this resolves #191
Also fixes #192
Tried a bunch and considered heaps of different stuff during this PR, still not happy with the pinging but I think the nature of the architecture means we are just going to have to accept that the online indicator won't always be very accurate