Replicate peer endpoints and forget paths if we have them -- this allows two clusters to talk to each other, whereas forgetting all paths does not.
This commit is contained in:
parent
cc6080fe38
commit
cc1b275ad9
5 changed files with 58 additions and 28 deletions
|
@ -412,6 +412,25 @@ public:
|
|||
*/
|
||||
void clean(const RuntimeEnvironment *RR,uint64_t now);
|
||||
|
||||
/**
|
||||
* Remove all paths with this remote address
|
||||
*
|
||||
* @param addr Remote address to remove
|
||||
*/
|
||||
inline void removePathByAddress(const InetAddress &addr)
|
||||
{
|
||||
Mutex::Lock _l(_lock);
|
||||
unsigned int np = _numPaths;
|
||||
unsigned int x = 0;
|
||||
unsigned int y = 0;
|
||||
while (x < np) {
|
||||
if (_paths[x].address() != addr)
|
||||
_paths[y++] = _paths[x];
|
||||
++x;
|
||||
}
|
||||
_numPaths = y;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find a common set of addresses by which two peers can link, if any
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue