From: Roland Häder <roland@mxchange.org>
Date: Tue, 21 Nov 2023 04:16:45 +0000 (+0100)
Subject: Continued:
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7705ec9c6f704f8e9f7fc20f6d8ff35bf4064ac9;p=fba.git

Continued:
- also need to reduce depth here
---

diff --git a/fba/http/federation.py b/fba/http/federation.py
index 1aa79b1..0fd5720 100644
--- a/fba/http/federation.py
+++ b/fba/http/federation.py
@@ -87,6 +87,7 @@ def fetch_instances(domain: str, origin: str, software: str, command: str, path:
         logger.debug("software='%s'", software)
         if software_helper.is_relay(software):
             logger.debug("software='%s' is a relay software - EXIT!", software)
+            _DEPTH = _DEPTH - 1
             return
 
     logger.debug("Updating last_instance_fetch for domain='%s' ...", domain)
@@ -122,6 +123,7 @@ def fetch_instances(domain: str, origin: str, software: str, command: str, path:
         return
     elif len(peerlist) == 0:
         logger.debug("domain='%s',software='%s' has an empty peer list returned - EXIT!", domain, software)
+        _DEPTH = _DEPTH - 1
         return
 
     logger.info("Checking %d instance(s) from domain='%s',software='%s',depth=%d ...", len(peerlist), domain, software, _DEPTH)
diff --git a/fba/http/nodeinfo.py b/fba/http/nodeinfo.py
index 341a15f..5810c56 100644
--- a/fba/http/nodeinfo.py
+++ b/fba/http/nodeinfo.py
@@ -25,8 +25,6 @@ from fba.http import network
 
 from fba.models import instances
 
-_DEPTH = 0
-
 logging.basicConfig(level=logging.INFO)
 logger = logging.getLogger(__name__)