Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8cc743a

Browse files
authored
chore: clarify error variable name in doAttach (#17284)
1 parent f8971bb commit 8cc743a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

agent/reconnectingpty/screen.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,9 @@ func (rpty *screenReconnectingPTY) doAttach(ctx context.Context, conn net.Conn,
307307
if closeErr != nil {
308308
logger.Debug(ctx, "closed ptty with error", slog.Error(closeErr))
309309
}
310-
closeErr = process.Kill()
311-
if closeErr != nil {
312-
logger.Debug(ctx, "killed process with error", slog.Error(closeErr))
310+
killErr := process.Kill()
311+
if killErr != nil {
312+
logger.Debug(ctx, "killed process with error", slog.Error(killErr))
313313
}
314314
rpty.metrics.WithLabelValues("screen_wait").Add(1)
315315
return nil, nil, err

0 commit comments

Comments
 (0)