This commit is contained in:
root 2020-04-18 00:41:15 -04:00
parent d8ac7b9b2e
commit 7275e0abce
2 changed files with 7 additions and 5 deletions

View File

@ -232,10 +232,12 @@ func (pm *ProxyManager) listenToClearCache() {
sigs := make(chan os.Signal, 1)
signal.Notify(sigs, syscall.SIGUSR2, syscall.SIGTERM)
go func() {
for {
<-sigs
pm.mux.Lock()
pm.Cache = NewQueueMap()
pm.mux.Unlock()
}
}()
}

View File

@ -290,7 +290,7 @@ class Openvpn:
print(f'[stderr]\n{stderr.decode()}')
if PID in self.pids:
self.pids.remove(PID)
await asyncio.sleep(5)
await asyncio.sleep(5*60)
if __name__ == "__main__":