fix bugs
This commit is contained in:
parent
d8ac7b9b2e
commit
7275e0abce
@ -232,10 +232,12 @@ func (pm *ProxyManager) listenToClearCache() {
|
||||
sigs := make(chan os.Signal, 1)
|
||||
signal.Notify(sigs, syscall.SIGUSR2, syscall.SIGTERM)
|
||||
go func() {
|
||||
<-sigs
|
||||
pm.mux.Lock()
|
||||
pm.Cache = NewQueueMap()
|
||||
pm.mux.Unlock()
|
||||
for {
|
||||
<-sigs
|
||||
pm.mux.Lock()
|
||||
pm.Cache = NewQueueMap()
|
||||
pm.mux.Unlock()
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
|
||||
@ -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__":
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user