fix: 消除合并后的变量遮蔽以通过检查
This commit is contained in:
+4
-4
@@ -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
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user