Merge pull request #31 from aprsme/fix-duplicate-aprs-connections

Fix duplicate APRS-IS connections in clustered deployments
This commit is contained in:
Graham McIntire 2025-07-25 12:11:43 -05:00 committed by GitHub
commit ba31ca0447
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -139,8 +139,10 @@ defmodule Aprsme.Application do
defp maybe_add_aprs_connection(children, _env) do
disable_connection = Application.get_env(:aprsme, :disable_aprs_connection, false)
cluster_enabled = Application.get_env(:aprsme, :cluster_enabled, false)
if disable_connection do
# Don't add AprsIsConnection if clustering is enabled or connection is disabled
if disable_connection or cluster_enabled do
children
else
children ++ [Aprsme.AprsIsConnection]