修复暂停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
-4
View File
@@ -274,10 +274,6 @@ func pauseServices(req pauseServicesRequest) error {
return errors.New(fmt.Sprintf("service %s configuration not found", stp.name))
}
// 使用和 updateService 相同的方法彻底断开所有连接
stp.service.Close()
registry.ServiceRegistry().Unregister(stp.name)
// 强制断开端口的所有连接
if serviceConfig.Addr != "" {
_ = kill.ForceClosePortConnections(serviceConfig.Addr)