mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2025-06-28 01:06:58 +00:00
Merge pull request #767 from donaldzou/potential-fix-#762
Background thread terminated when iterating conf list and list changed
This commit is contained in:
commit
ab5abe9bcf
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user