1
0
mirror of https://github.com/donaldzou/WGDashboard.git synced 2024-11-22 15:20:09 +01:00

Merge pull request #306 from donaldzou/v4.0-fix1

Fixed peer status is not refreshing correctly
This commit is contained in:
Donald Zou 2024-08-17 20:25:34 -04:00 committed by GitHub
commit 16998d1e16
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 72 additions and 72 deletions

View File

@ -570,7 +570,7 @@ class WireguardConfiguration:
def __getPeers(self): def __getPeers(self):
mt = os.path.getmtime(os.path.join(WG_CONF_PATH, f'{self.Name}.conf')) mt = os.path.getmtime(os.path.join(WG_CONF_PATH, f'{self.Name}.conf'))
if self.__configFileModifiedTime is None or self.__configFileModifiedTime != mt: # if self.__configFileModifiedTime is None or self.__configFileModifiedTime != mt:
self.Peers = [] self.Peers = []
with open(os.path.join(WG_CONF_PATH, f'{self.Name}.conf'), 'r') as configFile: with open(os.path.join(WG_CONF_PATH, f'{self.Name}.conf'), 'r') as configFile:
p = [] p = []