diff --git a/src/models/server/server.go b/src/models/server/server.go index bcd552f..978a509 100644 --- a/src/models/server/server.go +++ b/src/models/server/server.go @@ -286,7 +286,7 @@ func (p *ProxyServer) Close() { p.Release() // if the proxy created by PrivilegeMode, delete it when closed - if p.PrivilegeMode && oldStatus != consts.Closed { + if p.PrivilegeMode && oldStatus == consts.Working { // NOTE: this will take the global ProxyServerMap's lock // if we only want to release resources, use Release() instead DeleteProxy(p.Name)