mirror of
https://github.com/fosrl/pangolin.git
synced 2025-12-12 02:47:46 +00:00
Add logging to not sending because endpoint
This commit is contained in:
@@ -127,11 +127,18 @@ export const handleOlmRegisterMessage: MessageHandler = async (context) => {
|
|||||||
|
|
||||||
// Add the peer to the exit node for this site
|
// Add the peer to the exit node for this site
|
||||||
if (client.endpoint) {
|
if (client.endpoint) {
|
||||||
|
logger.info(
|
||||||
|
`Adding peer ${publicKey} to site ${site.siteId} with endpoint ${client.endpoint}`
|
||||||
|
);
|
||||||
await addPeer(site.siteId, {
|
await addPeer(site.siteId, {
|
||||||
publicKey: publicKey,
|
publicKey: publicKey,
|
||||||
allowedIps: [client.subnet],
|
allowedIps: [client.subnet],
|
||||||
endpoint: client.endpoint
|
endpoint: client.endpoint
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
logger.warn(
|
||||||
|
`Client ${client.clientId} has no endpoint, skipping peer addition`
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add site configuration to the array
|
// Add site configuration to the array
|
||||||
|
|||||||
Reference in New Issue
Block a user