mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-30 22:49:27 +02:00
Add TODO
This commit is contained in:
parent
f6a19631dc
commit
475a431859
1 changed files with 5 additions and 1 deletions
|
@ -54,13 +54,17 @@ export const handleGetConfigMessage: MessageHandler = async (context) => {
|
||||||
logger.warn("handleGetConfigMessage: Site not found");
|
logger.warn("handleGetConfigMessage: Site not found");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// todo check if the public key has changed
|
|
||||||
// we need to wait for hole punch success
|
// we need to wait for hole punch success
|
||||||
if (!existingSite.endpoint) {
|
if (!existingSite.endpoint) {
|
||||||
logger.warn(`Site ${existingSite.siteId} has no endpoint, skipping`);
|
logger.warn(`Site ${existingSite.siteId} has no endpoint, skipping`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (existingSite.publicKey !== publicKey) {
|
||||||
|
// TODO: somehow we should make sure a recent hole punch has happened if this occurs (hole punch could be from the last restart if done quickly)
|
||||||
|
}
|
||||||
|
|
||||||
if (existingSite.lastHolePunch && now - existingSite.lastHolePunch > 6) {
|
if (existingSite.lastHolePunch && now - existingSite.lastHolePunch > 6) {
|
||||||
logger.warn(
|
logger.warn(
|
||||||
`Site ${existingSite.siteId} last hole punch is too old, skipping`
|
`Site ${existingSite.siteId} last hole punch is too old, skipping`
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue