all: release resources when proxy closed using privilege mode

This commit is contained in:
fatedier
2016-06-28 00:55:30 +08:00
parent ba74934a1f
commit e580c7b6e6
2 changed files with 10 additions and 0 deletions

View File

@@ -186,6 +186,10 @@ func (p *ProxyServer) Close() {
p.CtlConn.Close()
}
}
// if the proxy created by PrivilegeMode, delete it when closed
if p.PrivilegeMode {
DeleteProxy(p.Name)
}
p.Unlock()
}