(oldRemote, newRemote Candidate)
| 1206 | } |
| 1207 | |
| 1208 | func (a *Agent) replaceRemoteInPairs(oldRemote, newRemote Candidate) { |
| 1209 | for i, pair := range a.checklist { |
| 1210 | if pair.Remote == oldRemote { |
| 1211 | oldPriority := pair.priority() |
| 1212 | replacement := replacePairRemote(pair, newRemote) |
| 1213 | replacement.setPriorityOverride(oldPriority) |
| 1214 | a.checklist[i] = replacement |
| 1215 | a.pairsByID[replacement.id] = replacement |
| 1216 | a.retargetKnownPairHolders(pair, replacement) |
| 1217 | |
| 1218 | if a.getSelectedPair() == pair { |
| 1219 | a.setSelectedPair(replacement) |
| 1220 | } |
| 1221 | } |
| 1222 | } |
| 1223 | } |
| 1224 | |
| 1225 | func (a *Agent) replaceRemoteInLocalCaches(oldRemote, newRemote Candidate) { |
| 1226 | for _, locals := range a.localCandidates { |
no test coverage detected