Browse Source

Fix Bug for closing an exist ProxyServer when another ProxyServer with same name comes.

Tsao 8 years ago
parent
commit
63be94c611
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/models/server/server.go

+ 1 - 1
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)