mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-08 03:36:37 +00:00
Add TODO
This commit is contained in:
@@ -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`
|
||||||
|
|||||||
Reference in New Issue
Block a user