Previously, when BeaconService could not find any IP address for its node, it broadcasted an empty address list; that caused an IndexOutOfBoundsException when clients tried to get the first address in the list. The list should never be empty or else the broadcast was pointless.
This PR changes BeaconService so if it can't find any local IP address, it logs a warning message; and then it does not bother sending out any broadcasts. It still remains available for local modules' use, however.
I tested it by manually changing the getLocalIPs() method to return an empty list, and manually verifying the correct behavior while running C5GeneralizedReplicationServiceTest.
Previously, when BeaconService could not find any IP address for its node, it broadcasted an empty address list; that caused an IndexOutOfBoundsException when clients tried to get the first address in the list. The list should never be empty or else the broadcast was pointless.
This PR changes BeaconService so if it can't find any local IP address, it logs a warning message; and then it does not bother sending out any broadcasts. It still remains available for local modules' use, however.
I tested it by manually changing the getLocalIPs() method to return an empty list, and manually verifying the correct behavior while running C5GeneralizedReplicationServiceTest.