Skip to content

Commit 63be94c

Browse files
TsaoTsao
authored andcommitted
Fix Bug for closing an exist ProxyServer when another ProxyServer with same name comes.
1 parent 0c10279 commit 63be94c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/models/server/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ func (p *ProxyServer) Close() {
285285
p.Release()
286286

287287
// if the proxy created by PrivilegeMode, delete it when closed
288-
if p.PrivilegeMode && oldStatus != consts.Closed {
288+
if p.PrivilegeMode && oldStatus == consts.Working {
289289
// NOTE: this will take the global ProxyServerMap's lock
290290
// if we only want to release resources, use Release() instead
291291
DeleteProxy(p.Name)

0 commit comments

Comments
 (0)