Skip to content

Commit

Permalink
Merge pull request #2110 from cyrossignol/fix-no-beacon
Browse files Browse the repository at this point in the history
gui: Fix "no active beacon" status
  • Loading branch information
jamescowens authored Apr 22, 2021
2 parents 6fcdc3a + 263ce49 commit c33982a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/qt/researcher/researchermodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -560,13 +560,12 @@ void ResearcherModel::updateBeacon()

if (beacon_key_present) {
beacon_status = MapAdvertiseBeaconError(m_researcher->BeaconError());
} else if (!beacon && !pending_beacon) {
beacon_status = BeaconStatus::NO_BEACON;
} else {
beacon_status = BeaconStatus::ERROR_MISSING_KEY;
}

// If automatic advertisement/renewal encountered a problem, raise this
// error first:
//
if (beacon_status != BeaconStatus::ACTIVE) {
commitBeacon(beacon_status, beacon, pending_beacon);
} else if (pending_beacon) {
Expand All @@ -583,8 +582,6 @@ void ResearcherModel::updateBeacon()
} else {
commitBeacon(BeaconStatus::ACTIVE, beacon, pending_beacon);
}
} else {
commitBeacon(BeaconStatus::NO_BEACON, beacon, pending_beacon);
}
}

Expand Down

0 comments on commit c33982a

Please sign in to comment.