From 63be94c611ae77549ac42711bdb712768ff773e3 Mon Sep 17 00:00:00 2001 From: Tsao Date: Fri, 13 Jan 2017 13:18:22 +0800 Subject: [PATCH] Fix Bug for closing an exist ProxyServer when another ProxyServer with same name comes. --- src/models/server/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/models/server/server.go b/src/models/server/server.go index 27590bf..055f1fa 100644 --- a/src/models/server/server.go +++ b/src/models/server/server.go @@ -285,7 +285,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)