Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maintain Connection with APRS-IS Server #123

Merged
merged 6 commits into from
Apr 21, 2022
Merged

Maintain Connection with APRS-IS Server #123

merged 6 commits into from
Apr 21, 2022

Conversation

CBielstein
Copy link
Owner

Description

As described in #122, the APRS-IS servers stop sending data after 48 hours, causing any connected client to stop receiving new packets.

This change adds an event that re-sends the login message every 6 hours to maintain connection and reset the 48hour timeout counter.

This resolves #122.

This uses System.Threading.Timer instead of System.Timers.Timer to allow multi-threaded use of the underlying TcpClient so that receiving is not interrupted.

Changes

  • Add a timer event triggering every 6 hours to message the APRS-IS server
  • This makes AprsIsConnection disposable, so the required changes were implemented for that as well

Validation

  • Build and tests pass
  • Ran locally with a shorter timeframe and verified that APRS-IS servers reset their timeout counter (via APRS-IS server status page) each time a message is sent
  • Opting not to put new unit tests on this for now to avoid adding more time-based tests

@CBielstein CBielstein added the enhancement New feature or request label Apr 16, 2022
@CBielstein CBielstein self-assigned this Apr 16, 2022
@CBielstein CBielstein merged commit 271a115 into main Apr 21, 2022
@CBielstein CBielstein deleted the conn-timeout branch April 21, 2022 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Periodically send connection messages to APRS-IS
2 participants