Update dashboard.py

Potential fix for #762
This commit is contained in:
Donald Zou 2025-05-29 16:52:13 +08:00
parent ef8849e8a9
commit 7834fff541

View File

@ -3115,9 +3115,12 @@ def peerInformationBackgroundThread():
time.sleep(10)
while True:
with app.app_context():
for c in WireguardConfigurations.values():
if c.getStatus():
try:
curKeys = list(WireguardConfigurations.keys())
for name in curKeys:
if name in WireguardConfigurations.keys() and WireguardConfigurations.get(name) is not None:
c = WireguardConfigurations.get(name)
if c.getStatus():
c.getPeersTransfer()
c.getPeersLatestHandshake()
c.getPeersEndpoint()