fix: 消除合并后的变量遮蔽以通过检查

This commit is contained in:
Nixevol
2026-09-30 12:12:13 +08:00
parent 7b209ce3d6
commit 4059a1576b
4 changed files with 11 additions and 9 deletions
+4 -4
View File
@@ -200,8 +200,8 @@ func runServe(ctx context.Context, cfg config.Config) error {
if _, found := brk.ConnInfoOf(endpointID); !found {
return false, nil
}
if err := sess.Disable(kickCtx, endpointID); err != nil {
return false, err
if disableErr := sess.Disable(kickCtx, endpointID); disableErr != nil {
return false, disableErr
}
return true, nil
},
@@ -209,8 +209,8 @@ func runServe(ctx context.Context, cfg config.Config) error {
if _, found := brk.ConnInfoOf(endpointID); !found {
return false, nil
}
if err := sess.Deleted(kickCtx, endpointID); err != nil {
return false, err
if deleteErr := sess.Deleted(kickCtx, endpointID); deleteErr != nil {
return false, deleteErr
}
return true, nil
},