closeIfNoRelays method
void
closeIfNoRelays()
Close the network controller if no relays were registered. This should be called after broadcast strategies complete to signal that the broadcast is done when there were no relays to broadcast to.
Implementation
void closeIfNoRelays() {
if (broadcasts.isNotEmpty || networkController.isClosed) return;
networkController.close();
}