修复暂停bug

This commit is contained in:
qaq
2025-06-28 23:24:07 +08:00
parent 34f5015369
commit fd6b5ddcdd
3 changed files with 66 additions and 154 deletions
-8
View File
@@ -547,10 +547,6 @@ func pauseService(ctx *gin.Context) {
}
}
// 使用和 updateService 相同的方法彻底断开所有连接
svc.Close()
registry.ServiceRegistry().Unregister(name)
// 强制断开端口的所有连接
if serviceAddr != "" {
_ = kill.ForceClosePortConnections(serviceAddr)
@@ -912,10 +908,6 @@ func pauseServices(ctx *gin.Context) {
return
}
// 使用和 updateService 相同的方法彻底断开所有连接
stp.service.Close()
registry.ServiceRegistry().Unregister(stp.name)
// 强制断开端口的所有连接
if serviceConfig.Addr != "" {
_ = kill.ForceClosePortConnections(serviceConfig.Addr)